hey everybody
I'm taking a computer class right now and one of the projects I need to do is
create a very simple pizza-ordering menu.
At this pizzeria, there is only one kind of pizza you can order:
regular (cheese) with no toppings. Your choices are what size of
pizza, and how many of them. Your program will need to figure out the
total price of the order. A small pizza costs $7.99, a medium $14.99,
and a large $18.99.
The program will begin by printing "Let me help you order a pizza.
Here are the choices: (a) small $7.99; (b) medium $14.99; (c) large
$18.99. Please enter a or b or c:".
Then the user will type "a" or "b" or "c" (followed by the <enter>
key). For example, suppose the user types "b" <enter>. Then the
program will print "Ok, medium, that is $14.99 each."
Then the program will print "Ok, medium, that is $14.99 each.
How many would you like?"
Then the user will type a number (followed by the <enter> key). For
example, suppose the user types "2" <enter>.
Then the program will print "Your total is $29.98. Press <enter> to
exit."
Then the user will type the <enter> key, and the program will halt.
Programming the assignment:
In this lab,
you will be using the raw_input function to get the response to each
question, and to put up the final "Press enter to exit" message.
There is more than one way to write this program, so we won't give you
step-by-step instructions. Here are some general hints:
You will need at least two variables, one to keep track of the size
of pizza, and another to keep track of number of pizzas.
You will probably want to use some sort of if-elif-else logic to
decide what the price is, based on the size of pizza ordered.
The raw_input function returns a string, and you need a number (of
pizzas.)
so far, i only got this
Menu=raw_input("Let me help you order a pizza. Here are the choices (a) small $7.99 (b) medium $14.99 (c) large $18.99. Please enter a or b or c:")
Let me help you order a pizza. Here are the choices (a) small $7.99 (b) medium $14.99 (c) large $18.99. Please enter a or b or c:
>>> a=raw_input("Ok, small, that is $7.99 each. How many would you like?")
Ok, small, that is $7.99 each. How many would you like?
>>> b=raw_input("Ok, medium, that is $14.99 each. How many would you like?")
Ok, medium, that is $14.99 each. How many would you like?
>>> c=raw_input("Ok, large, that is $18.99 each. How many would you like?")
Ok, large, that is $18.99 each. How many would you like?
>>> 2=raw_input("Ok, your total is $29.98.")
I'm not even sure if it is right. Thank you in advance, any help would be appreciated.