109k views
0 votes
Question 1

For questions 1-3, consider the following code:
* = int (input ("Enter a number: "))
if (x != 8):
print ("A")
if (x > 10):
print ("8")
if (x < 10):
print ("C")
if (x % 2 = 1):
print ("0")
What is output if the user types in 9? Click all that apply.
D C B A

1 Answer

4 votes

First of all, the print statements should be indented, and the last if statement should be x % 2 == 1 inside of the parentheses.

Other than those few mistakes, the output of the program when the user types in 9 is:

A

C

and whatever the last thing is in the final if statement.

I hope this helps!

User MSpeed
by
4.8k points