You are viewing our Forum Archives. To view or take place in current topics click here.
New to python need a little help
Posted:

New to python need a little helpPosted:

-Alxx-
  • TTG Contender
Status: Offline
Joined: Oct 08, 201014Year Member
Posts: 3,258
Reputation Power: 169
Status: Offline
Joined: Oct 08, 201014Year Member
Posts: 3,258
Reputation Power: 169
I'm new to python and have been given a task to complete but i can't get the part at the bottom to show up. anyone have any ideas?

print("Welcome to Alex's Flight Finder")
print("\n")

def main_menu(): #MainMenu
ff = """***Alex's Flight Finder***"""
print(ff)
print("[1] Search for flights\n[2] Cancel")
choice = input("Please select 1-2: ")

if choice == '1':
destination()
if choice == '2':
print("This programme will now close")
exit()
print("\n")

def destination(): #Destination and price
fp = """Please Select a destination"""
print(fp)
print("[01] Barcelona\n[02] Madrid\n[03] Rome\n[04] Berlin\n[05] Dublin\n[06] Belfast\n[07] Paris\n[08] Athens\n[09] Ibiza\n[10] New York\n[11] Sydney\n[12] Tokyo\n[13] Back")
choice = input("Please select 1-12: ")
print("\n")

if choice == '01':
print("Barcelona £120")
confrim()
if choice == '02':
print("Madrid £145")
confrim()
if choice == '03':
print("Rome £175")
confrim()
if choice == '4':
print("Berlin £110")
confrim()
if choice == '05':
print("Dublin £80")
confrim()
if choice == '06':
print("Belfast £85")
confrim()
if choice == '7':
print("Paris £105")
confrim()
if choice == '8':
print("Athens £220")
confrim()
if choice == '9':
print("Ibiza £230")
confrim()
if choice == '10':
print("New York £550")
confrim()
if choice == '11':
print("Sydney £825")
if choice == '12':
print("Tokyo £675")
confrim()
if choice == '13':
main_menu()

def confrim(): #Confriming price
con = """Is the price and destination that you have chosen"""
print(con)
print("[01] Checkout\n[2] Apply Promotional Code")
#2. Posted:
speed
  • 2000 Thanks
Status: Offline
Joined: Jun 11, 200915Year Member
Posts: 9,897
Reputation Power: 3160
Motto: "I'l no I grew up to fast speed I no u will be little famous" - Famous_Energy
Motto: "I'l no I grew up to fast speed I no u will be little famous" - Famous_Energy
Status: Offline
Joined: Jun 11, 200915Year Member
Posts: 9,897
Reputation Power: 3160
Motto: "I'l no I grew up to fast speed I no u will be little famous" - Famous_Energy
You're not calling your main menu function anywhere.
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.