Twa kɔ nsɛm atitiriw so
Log in
Sign up for FREE
arrow_back
Laabri

Loops & Functions Final Worksheet

star
star
star
star
star
Last updated over 4 years ago
5 Nsɛmmisa
1
1
1
Asemmisa {{asɛmmisaAhyɛnsode}}
3.

Reorder the follow code.

  1. number = 0

  2. number -= 2

  3. while ( number < 101):

  4. print(number)

1
1
Asemmisa {{asɛmmisaAhyɛnsode}}
1.

Correctly format the following function.

( , ):

print(firstName + " " + lastName)

Mmuae Afoforo a Wobɛpaw:
lastName
fullname
firstName
def
Asemmisa {{asɛmmisaAhyɛnsode}}
2.

Label each concept (marked in red) in the following for loop.

for i in range ( 10 , 40 , 3 ) :

for in range ( , , ):

Mmuae Afoforo a Wobɛpaw:
add to /subtract from
stop
variable
start
Asemmisa {{asɛmmisaAhyɛnsode}}
4.

Categorize if the loop is infinite or not

  • Infinite

  • Finite

Asemmisa {{asɛmmisaAhyɛnsode}}
5.

What will the following code output?