American Young Coder

AYC logo
Loading Events

« All Events

  • This event has passed.

7PM Python Level1

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

  1. We went over Python Quiz 1 questions and result
  2. Homework:
    1. We are going to write a program which is very similar to the scratch “Ask Gobo” from the white scratch book page 60 to 65. We call this game “Magic 8 Ball”. This is a continuation from last week homework. Name this file Magic8Ball.py
      1. Create a function that would do the following
        1. Ask the user the following “Ask Yes or No Question”
        2. Wait for the user to enter something. After user enter something print “You ask, <whatever user ask>”.
        3. And then the function will pick a random number from 1 to 8.
        4. Use the logic from last week homework to decide what answer to give (print) to the user.
        5. After providing the answer, ask the user again with “Ask Yes or No Question” in a forever loop.
        6. Only quit the loop if user type “quit”
    2. Create a separate python file called “NameMyBaby.py”
      1. Create a list of String variable (“boysName”) with the following value: ‘John’, ‘Peter’, ‘Marcus’, ‘James’, ‘Luke’.
      2. Create a list of String variable (“girlsName”) with the following value: ‘Abigail’, ‘Martha’, ‘Mary’, ‘Katherine’, ‘Agustine’.
      3. Create a function
        1. this function would ask a user, ‘What is your baby gender? (boy/girl)’
        2. If user answer boy, it would pick a random name from ‘girlsName’ list and print the name.
        3. If user answer girl, it would pick a random name from ‘boysName’ list and print the name.
        4. After providing the name, keep asking the user until user type ‘quit’.

Details

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