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

Module 3 Quiz - Arithmetic

star
star
star
star
star
Last updated over 6 years ago
10 Nsɛmmisa
1
1
1
1
1
1
1
1
1
1
Asemmisa {{asɛmmisaAhyɛnsode}}
1.

The operator that does integer division is ________.

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

The result of 10/3 is _____.

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

The result of 10 % 3 is ______.

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

The result of 10//3 is ___________.

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

The operator for assigning the result of a computation is __________.

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

What is the value of the following expression: 16 - 2 * 5 // 3 + 1

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

What is the value of total_cost that gets printed in the code below?

TotalCost = 5

TotalCost += 10

print(TotalCost)

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

Using the code below, if the user enters 7800, what is the value of Hours?

StrSeconds = input("Please enter the number of seconds you wish to convert")

TotalSecs = int(StrSeconds)

Hours = TotalSecs // 3600

SecsStillRemaining = TotalSecs % 3600

Minutes = SecsStillRemaining // 60

SecsFinallyRemaining = SecsStillRemaining % 60

print("Hrs=", Hours,",Mins=", Minutes, ", Secs=",SecsFinallyRemaining)

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

Using the code below, if the user enters 7800, what is the value of SecsStillRemaining?

StrSeconds = input("Please enter the number of seconds you wish to convert")

TotalSecs = int(StrSeconds)

Hours = TotalSecs // 3600

SecsStillRemaining = TotalSecs % 3600

Minutes = SecsStillRemaining // 60

SecsFinallyRemaining = SecsStillRemaining % 60

print("Hrs=", Hours,",Mins=", Minutes, ", Secs=",SecsFinallyRemaining)

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

Using the code below, if the user enters 7800, what is the value of SecsStillRemaining?

StrSeconds = input("Please enter the number of seconds you wish to convert")

TotalSecs = int(StrSeconds)

Hours = TotalSecs // 3600

SecsStillRemaining = TotalSecs % 3600

Minutes = SecsStillRemaining // 60

SecsFinallyRemaining = SecsStillRemaining % 60

print("Hrs=", Hours,",Mins=", Minutes, ", Secs=",SecsFinallyRemaining)