« All Events
6 PM – Intro To Python – Gamas
July 27, 2022 @ 6:00 pm - 7:00 pm
Today We Do
- We started with Kaleido spiral.
Homework
- Currently, the Kaleido spiral only have 3 colors: red, green and blue. Add more colors to it. Add any three colors to it.
- Also create a new file, call it July27_GroceryShoppingCart.py. Inside this file, continuously (forever loop) display the following menu to the user until user enter “4” then stop the program. If you are confused how to display multi-lines menu or prompt input, look at your book page 115. In that page, you can see the code to create 2 lines input. Hopefully, you can figure out how to create 5 lines of input if you know how to do 2 lines.
What do you want to purchase:
1. Milk - $5
2. Ice Cream - $4
3. Bread - $6
4. I am done, checkout please
Enter your selection: 1
What do you want to purchase:
1. Milk - $5
2. Ice Cream - $4
3. Bread - $6
4. I am done, checkout please
Enter your selection: 2
What do you want to purchase:
1. Milk - $5
2. Ice Cream - $4
3. Bread - $6
4. I am done, checkout please
Enter your selection: 3
What do you want to purchase:
1. Milk - $5
2. Ice Cream - $4
3. Bread - $6
4. I am done, checkout please
Enter your selection: 4