American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

5:30 PM – Intro To Python – Gamas

November 29, 2022 @ 5:30 pm - 6:30 pm

Today We Did
  1. We finished Nov8_ShoppingCart.py program
Homework
  1. Create a new file Nov29_RobuxShoppingCart.py. We are going to create something similar to Nov8_ShoppingCart.py, so if you are stuck with the below program, look at Nov8_ShoppingCart.py to see if you can get some sample codes.
  2. Create a new variable called robux_balance = 300
  3. Create a program that will continuously display the following menu. When the user enters “5”, stop the loop.
  4. If the user enters other than “1”, “2”, “3”, “4” or “5”, print “invalid selection”.
  5. Welcome to Robux Bank, you have 300 robux in the beginning.
    
    What do you want to do: 
    1. Buy hat 100 Robux
    2. Buy hair 150 Robux
    3. VIP Server 500 Robux
    4. Add more Robux
    5. Exit
    Enter your selection: 123123
    invalid selection
    
    What do you want to do: 
    1. Buy hat 100 Robux
    2. Buy hair 150 Robux
    3. VIP Server 500 Robux
    4. Add more Robux
    5. Exit
    Enter your selection: asdfasdf
    invalid selection
    
    What do you want to do: 
    1. Buy hat 100 Robux
    2. Buy hair 150 Robux
    3. VIP Server 500 Robux
    4. Add more Robux
    5. Exit
    Enter your selection: 5
    
    You have purchased the following items:
    Your remaining Robux balance is 300 Robux.

Details

Date:
November 29, 2022
Time:
5:30 pm - 6:30 pm
Event Categories:
,
Verified by MonsterInsights