American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

6 PM – Intro To Python – Darin

September 14, 2023 @ 6:00 pm - 7:00 pm

What We Did Today:

  1. Reviewed the homework on applying different concepts together in a function
  2. Covered extra ideas on functions including using functions inside other functions
  3. Practiced complicated examples for functions

Homework:

Create a new file called Sept14_FunctionHW.py and submit to google drive when you finish.

  1. Create a new function convert_from_kg_to_gram
  2. Make the function accept two arguments/parameters: kg and food
  3. Inside the function, convert from kg to gram by multiplying 1000 to kg
  4. Print out the name of the food and how much it weighs
  5. Return the result of the conversion
  6. Call the function with parameter 4 and capture the return value into a variable called “grams”.
  7. 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

Details

Date:
September 14, 2023
Time:
6:00 pm - 7:00 pm
Event Categories:
,
Verified by MonsterInsights