American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

7 PM – Intro To Python – Bill

May 7 @ 7:00 pm - 8:00 pm

Your HW:
  1. Create a new function called order_food
    1. 1 parameter: String food
    2. Will return the price of the food
    3. If the food parameter entered is “burger” the function should return 2.99
    4. “hot dog” 3.99
    5. “chicken nuggets” 1.99
    6. If it is not one of those foods, return -1
  2. Ask the user for what they would like to eat
  3. Then call the function and store what the cost of the food  is
  4. If the food they entered is not on the menu (order_food returned -1), then print out “<food> is not on the menu”
  5. Otherwise print out “1 <food> will cost <price (returned by order_food function) >”

Details

Date:
May 7
Time:
7:00 pm - 8:00 pm
Verified by MonsterInsights