Log in
Sign up for FREE
arrow_back
Library

Loops & Functions Final Worksheet

star
star
star
star
star
Last updated about 4 years ago
5 questions
1
1
1
1
1
Question 5
5.

What will the following code output?

Question 1
1.
Correctly format the following function.

______________________ ______________________ ( ______________________ , ______________________ ):
print(firstName + " " + lastName)
Other Answer Choices:
lastName
fullname
firstName
def
Question 2
2.
Label each concept (marked in red) in the following for loop.

for i in range ( 10 , 40 , 3 ) :
for ______________________ in range ( ______________________ , ______________________ , ______________________ ):
Other Answer Choices:
add to /subtract from
stop
variable
start
Question 3
3.

Reorder the follow code.

  1. number -= 2
  2. while ( number < 101):
  3. number = 0
  4. print(number)
Question 4
4.

Categorize if the loop is infinite or not

  • Infinite
  • Finite