6 October Exam Questions with Complete Solutions University of the
People
Self – Quiz Unit 5
Started on Thursday, 7 October 2021, 11:35 AM
State Finished
Completed on Thursday, 7 October 2021, 11:36 AM
Time taken 1 min 4 secs
Grade 10.00 out of 10.00 (100%)
Question 1
Correct
Mark 1.00 out of 1.00
Question text
Python allows while loops inside while loops and if statements within the body of if statements.
Select one:
True
False
The correct answer is 'True'.
Question 2
Correct
Mark 1.00 out of 1.00
Question text
What output will the following statements produce using Python in interactive mode?
>>> n = 2
>>> n = n + 5
>>> n
Select one:
a. 7
b. 5
c. 2
d. an error message will occur
, The correct answer is: 7
Question 3
Correct
Mark 1.00 out of 1.00
Question text
What output will the following Python commands produce?
n = 10000
count = 0
while n:
count = count + 1
n = n // 10
print (count)
Select one:
a. 5
b. 0
c. 10000
d. 1000
The correct answer is: 5
Question 4
Correct
Mark 1.00 out of 1.00
Question text
What is the value of the following Python expression?
"Xanadu" > "Yellowstone"
Select one:
True
False
The correct answer is 'False'.