91.1k views
21 votes
What is the output?

X = 9 % 2
if (x == 1):
print ("ONE")
else:
print ("TWO")

User Tixxit
by
6.7k points

1 Answer

3 votes

Answer:

ONE

Step-by-step explanation:

9 % 2 = 8 remainder 1

mod is asking for the remainder, so x = 1.

Since x equals 1, it will print ONE.

User Pablorsk
by
7.8k points