American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

5 PM – Indo – Intro To Python – Joel

October 27, 2023 @ 5:00 pm - 6:00 pm

Today we did:
  1. We learned:
  2. Variables and data types (Strings, Integers, Floats, Booleans)
  3. How to print
  4. Addition, subtraction, multiplication, Division
  5. Adding strings using +, and using f-strings (For example, f”Hi, my name is {name}”)
  6. If-elif-else chains
  7. And & or operators
Homework:
  1. Create a new file called Oct27_StringHomework.py
    • From pages 20-23, copy the Python code from the book.
    • If you don’t have the book yet, you can look at this PDF file – IntroToPythonP20toP23
  2. Create a new file called Oct27_IfElseHomework.
  3. Inside the file, create two variables: age and price
  4. Set price to 10 initially, and set age to 12.
  5. Then, using if-elif-else chains, check a couple of things:
  6. If age < 4, set the price to 0
  7. Else, if age < 18, set the price to 25
  8. Else, if age < 65, set the price to 40
  9. Else, set the price to 20
  10. At the end, display: Your admission cost is $, and then the price. For example, if the price is 40, then it should like: Your admission cost is $40.
  11. Make sure to submit the homework in the Google drive before Friday.
  12. If you have any questions, feel free to email me at joel@ayclogic.com or Mr. Gamas at gamas@ayclogic.com

Details

Date:
October 27, 2023
Time:
5:00 pm - 6:00 pm
Verified by MonsterInsights