Question

Python Programming Chapter 5 Programming Exercise Dinner Selection Program (60 points total) Pseudocode (10 points) As the fa

Dinner Selection Program (50 points) • Use IDLE editor in python to write the program to perform this task (File / New File)

how many meals do you want to plan? 3 meal your specialty prepared main entree is Hamburgers your scrumptious side is baked p

0 0
Add a comment Improve this question Transcribed image text
Answer #1

import random

def getMeal():
return random.randint(1,5)

def printResult(entree,side,dessert):
Entree=["Steak","Chicken","Shrimp","Hamburger","Fish"]
Side=["Max & Cheese","Pasta with sauce","French fries","Rice pilaf","Baked potato"]
Dessert=["Cake","Pie","Ice cream","Pudding","Jell-O"]
print('your specialty prepared main entee is',Entree[entree-1])
print('your scrumptious side is',Side[side-1])
print('your delicious dessert is',Dessert[dessert-1])

def main():
n=int(input('how many meals do you want to plan? '))
for i in range(1,n+1):
print('meal #',i)
entree=getMeal()
side=getMeal()
dessert=getMeal()
printResult(entree,side,dessert)
print()

main()

Python 3 O Help File Edit View Insert Cell Kernel Widgets Trusted In [1] import random def getMe al () return random.randint(

Add a comment
Know the answer?
Add Answer to:
Python Programming Chapter 5 Programming Exercise Dinner Selection Program (60 points total) Pseudocode (10 points) As...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT