This section contains carefully selected MCQs and Previous Year Questions with explanations to help students understand concepts and prepare effectively for examinations, interviews, and competitive tests.
Q: 1What is the output of this code in Python Language:
>>> x = 125
>>> y = 13
>>> x // = y
>>> x
Option A
In Python, the operator // is called the floor division. It divides the left operand by the right operand and provide the integer (floor) result.
The statement x //= y means x = x//y. Here, 125//13 gives 9 because floor division removes the decimal part and returns only the integer quotient. Therefore, the final value of x becomes 9.
You have reached the end of this topic. Continue learning with the next topic below.
Thank you so much for taking the time to read my Computer Science MCQs section carefully. Your support and interest mean a lot, and I truly appreciate you being part of this journey. Stay connected for more insights and updates! If you'd like to explore more tutorials and insights, check out my YouTube channel.
Don’t forget to subscribe and stay connected for future updates.