« All Events
7 PM – Intro To Python – Gamas
April 20, 2022 @ 7:00 pm - 8:00 pm
Today We Do
- We learned about function with return value.
Homework
- Create a new python file Apr20_FunctionWithReturnValueHomework.py
- Copy codes from page 139.
- Also create a function called: convert_from_hour_to_second. One parameter: hour. Return the result which is the conversion from hour to second. There are 60 mins in one hour and 60 seconds in one min. So there are 3600 seconds in one hour. This is very similar to convert_feet_to_inch function which we did in the class. Call the function, get the return value and print the result.
-
result = convert_from_hour_to_second(2)
print(result) # 7200