American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

6pm- Intro to Python- Joshua Widjanarko

October 10 @ 6:00 pm - 7:00 pm

Today We Did:

  1.  Reviewed Fix 2 Homework
    1. Remember that it is <= or >=   not  =>   =<
    2. If/Elif/else reminder: remember the idea of boxes
      1. If is start , elif in the middle(if needed), else in the end( if needed)
    3. int(“4”) is needed if you are using numbers for comparison.
    4. Test your code with all  kinds of numbers. You might find Bug/Error if you type a specific value in
    5. Remember three steps
      1. Find the location (Click on the blue line
      2. Look at the bottom of the error function
  2. Remember to do your homework quiz 2 practice (Bug free)

Homework:

In another new file, “quiz_2_practice”, do the following:

  1. https://www.ayclogic.com/intro-to-python-exercises-for-quiz-2/

Recommended Studying (quiz_2_additional Practice.py)

Question 1

Goal: Write the function gather_names_2 with the int variable max_names. gather_names will ask people for their name, and then add that names onto a list until someone types in “quit” or the list has a number of people equal the max_names. You will return that list of names

You will then call gather_names, and then randomely chose a single name in that list.

print the phrase “<Randomly Chosen Name>, you have won a prize”

The Following topics question also  might be useful to brush up on

  • Getting a random number or a random object from a list
  • how to write for loops/while loops to navigate lists
  • how to access, append, remove things from lists
  • how to find out how long lists are
  • how to ask for input

 

 

NOTES:

If you have any questions feel free to email me jwidjanarko@ayclogic.com 

Details

Date:
October 10
Time:
6:00 pm - 7:00 pm
Verified by MonsterInsights