American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

6 PM – Intro To Python – Darin

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

What We Did Today:

  1. Reviewed homework on functions with no return value
  2. Introduced the topic of functions with return values

Homework:

There are two parts to the homework, the website and the try it yourself from the book.

  1. Create a file called Sept7_FunctionsWithRV_HW.py and upload to google drive when finished.
  2. https://www.ayclogic.com/list-inputs-if-and-else-loops-and-function/ – number 7
  3. For those with the second edition of the book: Try It Yourself – page 137 do 8-3
  4. For those with the third edition of the book: Try It Yourself – page 136 – 137 do 8-3

Notes:

For the homework number 2:

The instruction says: Inside the function, convert the parameter “miles” into the “km” value. There are 1.6 km in one mile. Return the conversion result or the km value.

What this means is that you have to multiply the parameter named miles by 1.6 and return the output, and then print it in nice format.

For the homework number 3/4:

  1. Ignore the words “keyword” and “positional” in the homework for try it yourself. Just keep in mind that you are giving the function 2 parameters, size, and text, and then you are printing out “The shirt says {text} and is {size} cm big”.
  2. Here you are giving two different data types to the function, a string and an integer.

Details

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