Single Choice
Not Set
QWhat will be the output after the following statements?
x = 30
y = 7
x %= y
print(x)
ID: #3409
Python Operator MCQ
555 views
Question Info
#3409Q ID
Not SetDifficulty
Python Operator MCQTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
- It takes modulus using two operands and assign the result to left operand.
- x %= y is equivalent to x = x % y
x = 30 % 7
x = 2
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic