- This event has passed.
3 PM – Intro To Python – Gamas
January 24 @ 3:00 pm - 4:00 pm
Today We Learned
- We continued to learn about functions
- And how we can reduce code duplication with functions.
Homework
- Create jan_24_draw_face_hw.py
- Create a face function that can draw like this.
- function name – face
- parameter – x,y, eye_color, mouth_color

- Call the function two times with different coordinate
-
face_2(0,0, "green", "black") face_2(0,100, "brown", "red")
And it will produce like this

-
- Create a face function that can draw like this.
- Create jan_24_many_function_2.py
- Create a function to convert from miles to kilometer.
- There are 1.6 kilometer in one mile.
- When the function is called and 2 miles is given to the function, the function will say “There are 3.2 kilometers in 2 miles.”
- When the function is called and 3 miles is given to the function, the function will say “There are 4.8 kilometers in 3 miles.”
- Remember you should not do if elif statements problem. You need to do multiplication inside function. The function need to work for any miles.
- Figure out a good function name and parameter.