QuestionQ74

VerifiedComputer Programming and Python Fundamentals

What output does the following code produce?

Question Image

Explanation

The modulo operation 7 % 2 produces the remainder 1. Incrementing y by 1 changes it to 2, so print(y) outputs 2.

Community Discussion

No comments yet. Be the first to start the discussion!