American Young Coder

AYC logo
Loading Events

« All Events

  • This event has passed.

3PM Python Level 1

February 2, 2019 @ 3:00 pm - 4:00 pm

  1. We went over Loopy Loop chapter from page 32 to 35.
    1. We learned about “for loops”.
    2. We learned about “while loops”.
    3. We learned about “Infinite loops”.
    4. We learned about “Nested loops”.
  2. Homeworks:
      1. Using “for loops” print “Are we there yet?” to shell 5 times. The result would look like below
        1. Are we there yet?
          Are we there yet?
          Are we there yet?
          Are we there yet?
          Are we there yet?
      2. Change the code in the previous question to also prefix “Are we there yet” with a number like the following:
        1. 2 Are we there yet?
          3 Are we there yet?
          4 Are we there yet?
          5 Are we there yet?
          6 Are we there yet?
      3. Using “while loops” do the following forever:
        1. Print “Give me your age?”
        2. If the user enters “bye” quit the loop. Look at page 34 for code on how to break from the infinite loop.
        3. If the user enters 0 print “You are a newborn baby”.
        4. If the user enters any number smaller than 4 then print “You are a toddler”.
        5. If the user enters any number smaller than 13 then print “You are a kid”.
        6. If the user enters any number smaller than 20 then print “You are a teenager”.
        7. If the user enters any number smaller than 40 then print “You are an adult”.
        8. If the user enters any number greater than or equal to 40 then print “Dude!! You are old.”
        9. Repeat the process to #1 (“Give me your age?”)
      4. Using two nested “for loops” print the following:
        ready
        ready
        ready
        Jump
        
        ready
        ready
        ready
        Jump
      5. Using two nested “for loops” print the following:
        1
        2
        3
        go
        
        1
        2
        3
        go
        
        1
        2
        3
        go

Details

Date:
February 2, 2019
Time:
3:00 pm - 4:00 pm
Event Categories:
,