How am I supposed to call the workshop and location variables from another defined function? I have to do it this way but whenever I run the program, it tells me the workshop variable is not defined. code:
def main():
print (menu_quest())
print(worklodge_cost())
#Print menu
def menu_quest():
print ('\t\t\tMENU WORKSHOP SELECTOR')
print ('\tWORKSHOPS \tRegistration Fee \tDays')
print ('1) Handling Stress \t$1000 \t\t\t3 ')
print ('2) Time Management\t$800 \t\t\t3 ')
print ('3) Supervision Skills\t$1600 \t\t\t3 ')
print ('4) How to Interview \t$500 \t\t\t1\n')
print ('\tLOCATION \tLodging Fee per Day')
print ('1) Austin \t\t$150')
print ('2) Chicago\t\t$225 ')
print ('3) Phoenix\t\t$175 ')
print ('4) Orlando\t\t$300 ')
workshop = int(input("From the menu, enter the number coresponding to your workshop selection: ")) #asking user to choose from the table
location = int(input("From the menu, enter the number coresponding to the location you will be traveling to: ")) #same as before
return workshop
return location
def worklodge_cost():
if workshop == 1: #what number the user puts in determines what values they get out of this workshop section
price = 1000
amtdays = 3
elif workshop == 2:
price = 800
amtdays = 3
elif workshop == 3:
price = 1600
amtdays = 3
elif workshop == 4:
price = 500
amtdays = 1
return workshop, price, amtdays
if location == 1: #what number the user puts in determines the price of their lodging
lodgeprice = 150
elif location == 2:
lodgeprice = 225
elif location == 3:
lodgeprice = 175
elif location == 4:
lodgeprice = 300
totalodging = amtdays * lodgeprice
return totalodging
main()