CBSE Class 12 Computer Science Question 106 of 120

Review of Python Basics — Question 1

Back to all questions
1
Question

Question 1

The two statements x = int(22.0/7) and x = int(22/7.0) yield the same results.

Answer

True

Reason — In Python, when we use the '/' operator to divide two numbers, it performs floating-point division, resulting in a float. Both division operations (22.0/7 and 22/7.0) yield float results due to the '/' operator. The 'int' function is applied to these float results, converting them to integers by truncating the decimal part.