- This event has passed.
3 PM – Python OOP – Gamas
April 5, 2025 @ 3:00 pm - 4:00 pm
Today We Did
- We exercises with function and list.
Homework
- Create apr_6_hw.py
- Create a new function “favorite_dance_style”
- It has 1 parameter: dance_style
- Inside the function print “I like ballet” if the parameter is equal to “ballet”
- Otherwise, print “I don’t like <dance_style>”
- Call the function like these
- favorite_dance_style(“ballet”)
- favorite_dance_style(“tango”)
- Create a list “friends”
- Add 3 names
- use for loop to print each name in the list.
- After the for loop, add the 4th name to the list: Gamas
- user for loop to print each name in the list, if the name is “Gamas” print “Gamas is my teacher”.