Page 1 of 1

I have to submit a final project for my Python coding class. I am having issues coming up with a way to set up my codin

Posted: Sat May 14, 2022 7:01 pm
by answerhappygod
I have to submit a final project for my Python coding
class. I am having issues coming up with a way to set up my
coding to where I can import from another file. It is a
requirement but I can't seem to get it to work. Here are the
requirements he posted:
Please follow the following requirements for your final project.
This shows a detailed breakdown for how the points are
distributed:
Here is my project code:
Ponderosa=0
ChinaWind=0
OliveGarden=0
Outback=0
RapidFire=0
MissionBBQ=0
ElNopal=0
Bubba=0
Joella=0
print("Welcome to your date night assistant. Let's find a place
to eat!!")
Q1=input("What type of food are you wanting to eat? Type CC to
quit. \na) American \nb) Mexican \nc) Italian \nd) Chinese \ne)
Buffet\n")
if Q1 == "a":
Q2=input("Which type of American food do you want?
\na) steak \nb) BBQ \nc) burgers \nd) chicken \ne) didn't choose
American\n")
if Q2 == "a":
Outback+=1
elif Q2 == "b":
MissionBBQ+=1
elif Q2 == "c":
Bubba+=1
elif Q2 == "d":
Joella+=1
Outback+=1
MissionBBQ+=1
Bubba+=1
Joella+=1
else:
print("I didn't understand that
answer.")
elif Q1 == "b":
ElNopal+=1
elif Q1 == "c":
OliveGarden+=1
RapidFire+=1
elif Q1 == "d":
ChinaWind+=1
elif Q1 == "e":
Ponderosa+=1
elif Q1 == "CC":
quit
else:
print("I didn't understand that answer.")
Q3=input("How far are you wanting to travel? \na) ten miles \nb)
twenty miles\n")
if Q3 == "a":
Ponderosa+=1
ChinaWind+=1
ElNopal+=1
elif Q3 == "b":
OliveGarden+=1
RapidFire+=1
Joella+=1
Bubba+=1
MissionBBQ+=1
Outback+=1
else:
print("I didn't understand that answer.")
Q4=input("How much are you willing to pay? \na) more affordable
\nb) more expensive\n")
if Q4 == "a":
Ponderosa+=1
ChinaWind+=1
ElNopal+=1
RapidFire+=1
Joella+=1
Bubba+=1
elif Q4 == "b":
OliveGarden+=1
MissionBBQ+=1
Outback+=1
else:
print("I didn't understand that answer.")
if Ponderosa > ChinaWind and Ponderosa > OliveGarden and
Ponderosa > Outback and Ponderosa > RapidFire and Ponderosa
> MissionBBQ and Ponderosa > ElNopal and Ponderosa > Bubba
and Ponderosa > Joella:
print("Ponderosa!!\nAddress is: 1211 W McClain
Ave\nScottsburg")
elif ChinaWind > Ponderosa and ChinaWind > OliveGarden and
ChinaWind > Outback and ChinaWind > RapidFire and ChinaWind
> MissionBBQ and ChinaWind > ElNopal and ChinaWind > Bubba
and ChinaWind > Joella:
print("China Wind!!!\nAddress is: 1906 W McClain
Ave\nScottsburg")
elif OliveGarden > ChinaWind and OliveGarden > Ponderosa and
OliveGarden > Outback and OliveGarden > RapidFire and
OliveGarden > MissionBBQ and OliveGarden > ElNopal and
OliveGarden > Bubba and OliveGarden > Joella:
print("Olive Garden!!\nAddress is: 1230 Veterans
Parkway\nClarksville")
elif Outback > ChinaWind and Outback > OliveGarden and
Outback > Ponderosa and Outback > RapidFire and Outback >
MissionBBQ and Outback > ElNopal and Outback > Bubba and
Outback > Joella:
print("Outback!!\nAddress is: 1209 Veterans
Parkway\nClarksville")
elif RapidFire > ChinaWind and RapidFire > OliveGarden and
RapidFire > Outback and RapidFire > Ponderosa and RapidFire
> MissionBBQ and RapidFire > ElNopal and RapidFire > Bubba
and RapidFire > Joella:
print("Rapid Fire!!\nAddress is: 1645 Veterans
Parkway\nClarksville")
elif MissionBBQ > ChinaWind and MissionBBQ > OliveGarden and
MissionBBQ > Outback and MissionBBQ > RapidFire and
MissionBBQ > Ponderosa and MissionBBQ > ElNopal and
MissionBBQ > Bubba and MissionBBQ > Joella:
print("Mission BBQ!!\nAddress is: 1213 Veterans
Parkway\nClarksville")
elif ElNopal > ChinaWind and ElNopal > OliveGarden and
ElNopal > Outback and ElNopal > RapidFire and ElNopal >
MissionBBQ and ElNopal > Ponderosa and ElNopal > Bubba and
ElNopal > Joella:
print("El Nopal!!\nAddress is: 700 Clifty
Dr\nMadison")
elif Bubba > ChinaWind and Bubba > OliveGarden and Bubba >
Outback and Bubba > RapidFire and Bubba > MissionBBQ and
Bubba > ElNopal and Bubba > Ponderosa and Bubba >
Joella:
print("Bubba's!!\nAddress is: 4631 Medical Plaza
Way\nClarksville")
elif Joella > ChinaWind and Joella > OliveGarden and Joella
> Outback and Joella > RapidFire and Joella > MissionBBQ
and Joella > ElNopal and Joella > Bubba and Joella >
Ponderosa:
print("Joella's!!\nAddress is: 1255 Veterans Parkway
Suite 700\nClarksville")
else:
print("Too difficult to decide. Please try again
later.")
print("Enjoy your night!!")
If anyone has any suggestions on how to set it up to import from
a file please let me know! Thanks!
0-01 Chino Olive Duta Rapiarire TH Spain सव arty ter tytut I can helt an authent Sear)

File Edit Format Run Options Window Help Roosters Harrysstonegrilltal else print(" didn't understand that answer") elit Q1" ElNopala ir Q1": Olive Garden RedPepperonita1 Rapidfire elit 01-": Chinakinda Kansai Japenesesteakhouse Ponderosa Golden Corral T QUE quit print("t didn't understand that anver.") 03-i purow far are you wanting to travel \na) ten miles Inb) twenty nilen ) Ponderosa Chinwind copal WedPepper shokin roves Hobokenties Harrystoner Steakhouse Bedreperoni Olive Garden apidrire Joella Bubbar Mission Outback Goldenco Booster ansaitapeneseteakhouse print" didnt nderstand that ansver) 04-ingut much you willing to pay? Whal more aftordable in more expensive\n")



GAM