« All Events
10 AM – Intro To Python – Gamas
August 17 @ 10:00 am - 11:00 am
Today We Did
- We finished with draw_car function
- We reviewed functions even more specifically about last week homework.
Homework
- Create aug_17_function_hw.py
- create a new function “positive_or_negative”. It should have one parameter “num”. Inside the function check if the parameter is less or more than o. If it is less than zero then print “<num> is a negative number”. Otherwise, print “<num> is a positive number”. Call the function like the following
- positive_or_negative(-100) . This will print “-100 is a negative number”
- positive_or_negative(4). This will print “4 is a positive number”.
- positive_or_negative(-2). This will print “-2 is a negative number”.
- create a new function “divide”. It should have two parameters: n1, n2. Inside the function divide n1 with n2. print the result.