American Young Coder

AYC logo
Loading Events

« All Events

  • This event has passed.

7 PM – Intro To Python – C

March 25, 2020 @ 7:00 pm - 8:00 pm

  1. We reviewed our String functions and List homeworks.
  2. We learned how get input from shell.
  3. We learned how to do simple IF-ELSE statements
  4. Homework:
    1. Create a program that would do the following
      1. Get input from user “How old are you? “. Save the input to a variable “age”.
      2. Get another input from user “Are you a genius (y/n)? “. Save the input to a variable “is_genius”.
      3. Create IF-ELSE statement just like we have learned in the class that will do the following,
        1. If age is greater 15 or is_genius is “y” then print “You can go to college”.
        2. else print “You can not go to college.”
        3. If you want to compare if “is_genius” is equal to “y” or “n”, do something like this
          if is_genius == "y":

          don’t do

          if is_genius = "y":
      4. Examples
      5. How old are you? 10
        Are you a genius (y/n)? y
        You can go to college
        
        How old are you? 16
        Are you a genius (y/n)? n
        You can go to college
        
        How old are you? 10
        Are you a genius (y/n)? n
        You can not go to college
        
        

Details

Date:
March 25, 2020
Time:
7:00 pm - 8:00 pm
Event Categories:
,