- This event has passed.
3PM Python Level 1
February 9, 2019 @ 3:00 pm - 4:00 pm
- We reviewed the Loopy Loops project from 32 to 35.
- We reviewed last week homework about different kind of loops.
- We started with a new lesson on how to create functions in python.
- Homework:
- Create a function called “doSomething”. This function has no parameter:
- Inside this function, print “Hello “.
- Create a function called “doSomething2”.This function has one parameter (“name”):
- Inside this function, combine/concatenate the word “Hello ” and the parameter “name”.
- When you call the function doSomething2(“Gamas”), it will print the following
-
Hello Gamas
-
- When you call the function doSomething2(“Ryan”), it will print the following
-
Hello Ryan
-
- Create a function called “starwars”, no parameter.
- Create a new variable (“robots”), it is a List of String variable.
- The value of the ”robots” variable is: “R2-D2”, “C-3PO”, “ASN-121”, “WALL-E”, “DATA”, “BUMBLE-BEE”
- When this function is called, it will print all of the elements inside the list. Use “for loop” to go through each element inside the list.
-
R2-D2 C-3PO ASN-121 WALL-E DATA BUMBLE-BEE
-
- Create a function called “doSomething”. This function has no parameter: