
”’
Homework:
#1.)
create a function named “print_me”
that gets has two arguments
a list, a limit
list_of_int = [1,2,3,4]
print_me(list_of_int, limit)
in the func, go through the list
and use a for loop to print the elements
of the list according the the limit
ex.
print_me(list_of_int, 2)
output:
1
2
”’
”’
#2.)
create a function named “find_nemo”
one argument, a list
list_of_movies = [cars, incredibles, toy story, nemo]
find_nemo(list_of_movies)
in the func, go through each element in the list
with a for loop
if the element in the list is equal to nemo
then print “I found nemo”
else print(“I have not found nemo”)
ex.
output:
find_nemo(list_of_movies)
i have not found nemo
i have not found nemo
i have not found nemo
i have found nemo
”’
If you have any questions, please feel free to email me at nathaniel@ayclogic.com!