American Young Coder

AYC logo
Loading Events

« All Events

  • This event has passed.

12 PM – Intro To Python – Gamas

October 18 @ 12:00 pm - 1:00 pm

Today We Did
  1. We went over if elif else and ==, <=, >, >=.
  2. We learn how to get input from shell.
Homework
  1. Create a new python file if_else_game_hw.py
  2. Create a program that will utilize “input” and “if else” statements. The program will allow user to enter a game name in the shell. if user enter “minecraft” then it will say “I like minecraft a lot.”. Otherwise, it will say “<game name> is not super good.”
  3. Look at example below
  4. Enter name of a game: minecraft
    I like minecraft a lot.
    
    Enter name of a game: mario
    mario is not super good
    
    Enter name of a game: crash banditcoot
    crash banditcoot is not super good
  5. Create a new python file if_elif_else_candy_price_hw.py
  6. Create a program that will utilize “input” and “if else” statements and “<=” operator. The program will allow user to enter price of a candy from shell. If user enter price that is bigger than 10, than print “<candy_price> is a very expensive candy.” Otherwise it will print “<candy_price> is an affordable candy.”. Look at the code that we did in the class today for example,
  7. Look at example below
  8. Enter candy price: 5
    $5 is an affordable candy.
    
    Enter candy price: 1
    $1 is an affordable candy.
    
    Enter candy price: 12
    $12 is a very expensive candy.
    
    Enter candy price: 20
    $20 is a very expensive candy.

Details

Date:
October 18
Time:
12:00 pm - 1:00 pm