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
  • Intro to Programming and Logic (chapter 5): Python 2 - Conditionals and Recursion: Write a program...

    Intro to Programming and Logic (chapter 5): Python 2 - Conditionals and Recursion: Write a program that will simulate a roulette wheel. The pockets on a roulette wheel are different colors. There are 36 pockets – numbered 0 to 35. Pocket 0 and 18 are green. For pockets 1 – 8, the even numbers are black and the odd numbers are red. For pockets 9 – 17, the even numbers are red and the odd numbers are black. For pockets...

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