American Young Coder

AYC logo
Loading Events

« All Events

  • This event has passed.

7PM Python Level 1

October 19, 2018 @ 7:00 pm - 8:00 pm

  1. Python Level 1, 1st Quiz.
  2. Homeworks
    1. Create a new python file call it “HomeworkOct19.py”
    2. Inside the file, create a for loop which will print number from 4 to 20. Review at “Loopy Loops” chapter to get some guidance (P.32 to P.35)
    3. Inside the file, create a WHILE LOOP which will keep on asking the user, “Are you hungry?” If the answer is ‘y’, print ‘Here is a burger’ and ask ‘Are you hungry again?’ . if the answer is ‘maybe’, print ‘Make up your mind!!’ and ask ‘Are you hungry again?’ . If the answer is anything else, print ‘bye bye’ and quit from the loop. Review at “Loopy Loops” chapter to get some guidance (P.32 to P.35)
    4. Create a function, no parameter, which will return a random number between 1 to 8. Review “Password Picker” chapter from page 52 to 56 to see how to produce a random number.
    5. Create a function which take one parameter and will behave like the following:
      1. If number 1 is passed to the function, it will return “It is certain.”
      2. If number 2 is passed to the function, it will return “Most likely.”
      3. If number 3 is passed to the function, it will return “Signs point to yes.”
      4. If number 4 is passed to the function, it will return “Most likely.”
      5. If number 5 is passed to the function, it will return “Ask again later.”
      6. If number 6 is passed to the function, it will return “Concentrate and ask again.”
      7. If number 7 is passed to the function, it will return “Outlook not so good.”
      8. If number 84 is passed to the function, it will return “My reply is no.”

Details

Date:
October 19, 2018
Time:
7:00 pm - 8:00 pm
Event Categories:
,