18.9k views
0 votes
Consider the following code:

X = 17
y = 5
print (x % y)
What is output?
A: 2
B: O 1
C: 03
D: O 3.4

User Jblasco
by
4.9k points

1 Answer

7 votes

Answer:

2

Step-by-step explanation:

The python operator % will grab the remainder of a division expression. 17 / 5 is around 3 and the remainder is 2. Thus, proving the answer is 2.

hope this helped :D

User Janith Widarshana
by
4.4k points