- This event has passed.
6 PM – Intro To Python – Darin
September 14, 2023 @ 6:00 pm - 7:00 pm
What We Did Today:
- Reviewed the homework on applying different concepts together in a function
- Covered extra ideas on functions including using functions inside other functions
- Practiced complicated examples for functions
Homework:
Create a new file called Sept14_FunctionHW.py and submit to google drive when you finish.
- Create a new function convert_from_kg_to_gram
- Make the function accept two arguments/parameters: kg and food
- Inside the function, convert from kg to gram by multiplying 1000 to kg
- Print out the name of the food and how much it weighs
- Return the result of the conversion
- Call the function with parameter 4 and capture the return value into a variable called “grams”.
- Print “There are 4000 grams in 4 KG” using the variables.
Notes:
If you have any questions, feel free to email me at ddjapri@ayclogic.com