American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

8 PM – Python OOP – Joel

November 17 @ 8:00 pm - 9:00 pm

Today we did:
  1. We started working on the MonsterSystem
Homework:
  1. Make a new file called Nov17_Exercises and do the following:
  2. Make a new dictionary called student that stores the name as a key and the age as the value. The names and ages are up to you, but make 3 items.
  3. For example, in mine: {19:John, 40:Will, 31:Alice}
  4. Take Will from the dictionary and print it.
  5. Change “Will” with “Emma”
  6. Add a new item (35:Daniel)
  7. Delete John from the dictionary.
  8. Make 3 for loops: One looping through just the keys, one through just the values, and one for both the keys and the values.
  9. Make a new function called format_name. It has two parameters: first_name and last_name. It takes the first_name and last_name, combines them in one string (you can call it full_name), and then returns it.
  10. Make a new function called print_greeting(). It calls format_name() with a first and last name and prints “Welcome, <full name>!”.

If you have any questions, feel free to email me at joel@ayclogic.com.

Details

Date:
November 17
Time:
8:00 pm - 9:00 pm
Verified by MonsterInsights