Loops & Functions Final Worksheet

Last updated almost 4 years ago
5 questions
1
Correctly format the following function.

______________________ ______________________ ( ______________________ , ______________________ ):
print(firstName + " " + lastName)
Other Answer Choices:
lastName
fullname
firstName
def
1
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
1

Reorder the follow code.

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

Categorize if the loop is infinite or not

  • Infinite
  • Finite
1

What will the following code output?