INF1511
Assessment 2
Unique code : 240720
By: Phumla P Mota
, Question 1
For the user input, what would be the output of the program?
#input
nTemp=int(input('Please input your temperature reading : '))
#process
if (nTemp >= 37):
#output
print('Please go for a COVID TEST NOW!')
else:
print('all OK, have a HAPPY day!')
a.
Please input your temperature reading : 37
all OK, have a HAPPY day!
b.
syntax error
c.
Please input your temperature reading : 37
all OK, have a HAPPY day
d.
Please input your temperature reading : 37
Please go for a COVID TEST NOW!
Feedback
The correct answer is: Please input your temperature reading : 37
Please go for a COVID TEST NOW!
Question 2
Incorrect
Mark 0.00 out of 1.00
Flag question
Question text
What is the output from the execution? The age is 65.
nCost=0
nAge=int(input('Please enter your age : '))
Assessment 2
Unique code : 240720
By: Phumla P Mota
, Question 1
For the user input, what would be the output of the program?
#input
nTemp=int(input('Please input your temperature reading : '))
#process
if (nTemp >= 37):
#output
print('Please go for a COVID TEST NOW!')
else:
print('all OK, have a HAPPY day!')
a.
Please input your temperature reading : 37
all OK, have a HAPPY day!
b.
syntax error
c.
Please input your temperature reading : 37
all OK, have a HAPPY day
d.
Please input your temperature reading : 37
Please go for a COVID TEST NOW!
Feedback
The correct answer is: Please input your temperature reading : 37
Please go for a COVID TEST NOW!
Question 2
Incorrect
Mark 0.00 out of 1.00
Flag question
Question text
What is the output from the execution? The age is 65.
nCost=0
nAge=int(input('Please enter your age : '))