Log in
Sign up for FREE
arrow_back
Library

Module 3 Quiz - Arithmetic

star
star
star
star
star
Last updated about 6 years ago
10 questions
1
1
1
1
1
1
1
1
1
1
Question 1
1.

Question 2
2.

Question 3
3.

Question 4
4.

Question 5
5.

Question 6
6.

Question 7
7.

Question 8
8.

Question 9
9.

Question 10
10.

The operator that does integer division is ________.
%
/
//
The result of 10/3 is _____.
3
3.3
1
The result of 10 % 3 is ______.
3
3.3
1
The result of 10//3 is ___________.
3
3.3
1
The operator for assigning the result of a computation is __________.
<
=
:=
#
What is the value of the following expression: 16 - 2 * 5 // 3 + 1
14
24
12
13.667
What is the value of total_cost that gets printed in the code below?

TotalCost = 5
TotalCost += 10
print(TotalCost)
5
10
15
20
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)
2.1
3
2
0
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)
2.1
600
2
400
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)
Hrs= 1262 , Mins= 0 , Secs= 40
Hrs= 400 , Mins= 0 , Secs= 0
Hrs= 2.1 , Mins= 6.6 , Secs= 40
Hrs= 2 , Mins= 6 , Secs= 40