- This event has passed.
10:30 AM – Intro To Python – Bill
June 22 @ 10:30 am - 11:30 am
Your HW:
- Study for the quiz next week
- Do this practice problem:
- Create new function with return value, called meter_to_cm
1 paramter, meters
convert the parameter meters into centimeters (1 meter = 100 cm)
(number of cm = number of meters * 100)ask the user for number of meters to conver to cm
plug in that user input into the function and print out:
“<entered meters> is equal to <resulting centimeters>”Make the program run continuously until the user enters “exit”
use a while loop, add code to make sure it exits (break)
- Create new function with return value, called meter_to_cm
- List of topics to study:
Data types (list data types)
Lists, how to add items to it
Looping through listsLoops: while True, for loop with range
Get user input, (careful of datatypes how to convert to int)Functions: with and without return value
Fixing bugs – practice with the old homework
Make sure to check the expected result and adjust your fixed code to make it
act like the expected result