|
#if user want yo run again
min_n=int(input("""Please enter minimum number of people:
"""))
max_n=int(input("""Please enter maximum number of people:
"""))
#caculate total cost of maximum number and minimum number
max_cost=25+15*max_n
min_cost=25+15*min_n
#ask the user whether to enable additional features
e_n=int(input("""Do you want to output all the values? (answer: 1(yes) or 2(no)):
"""))
d=int(input("""Please select currency type 1(USD) or 2(CAN):
"""))
#only output minimun of number and maximum of number
if e_n>1:
#use CAN
if d>1:
print("The total cost can range from $",min_cost,"to $",max_cost,end="")
print(".")
#ask user while want to run again
r=int(input("Want to try again?【answer: 1(yes) or 2(no)】"))
if r>1:
a=1
else :
print()
#use USD
else :
min_cost=1.36*min_cost
max_cost=1.36*max_cost
print("The total cost can range from $",min_cost,"to $",max_cost,end="")
print(".")
#ask user while want to run again
r=int(input("Want to try again?【answer: 1(yes) or 2(no)】"))
if r>1:
a=1
else :
print()
#output all possible values
else :
#use CAN
if d>1:
max_cost=max_cost+1
print("The following outputs all possible values")
ready=str(input("""(Enter any button):
"""))
print("The following outputs all possible valuesrange:")
for i in range(min_cost,max_cost):
print(i)
#ask user while want to run again
r=int(input("Want to try again?【answer: 1(yes) or 2(no)】"))
if r>1:
a=1
else :
print()
#use USD
else :
min_cost=1.36*min_cost
max_cost=1.36*max_cost
max_cost=max_cost+1
print("The following outputs all possible values")
ready=str(input("""Are you ready?(Enter any button):
"""))
print("The following outputs all possible valuesrange:")
for i in range(min_cost,max_cost):
print(i)
#ask user while want to run again
r=int(input("Want to try again?【answer: 1(yes) or 2(no)】"))
if r>1:
a=1
else :
print()
|
|