« All Events
7 PM – Intro To Python – Bill
May 7 @ 7:00 pm - 8:00 pm
Your HW:
- Create a new function called order_food
- 1 parameter: String food
- Will return the price of the food
- If the food parameter entered is “burger” the function should return 2.99
- “hot dog” 3.99
- “chicken nuggets” 1.99
- If it is not one of those foods, return -1
- Ask the user for what they would like to eat
- Then call the function and store what the cost of the food is
- If the food they entered is not on the menu (order_food returned -1), then print out “<food> is not on the menu”
- Otherwise print out “1 <food> will cost <price (returned by order_food function) >”