Practice mode Python

What happens in Python 3 when an int calculation produces a value larger than 2**63?

Correct answer B. The int grows automatically, because integers have unlimited precision

Explanation

Python 3 integers have arbitrary precision, limited only by available memory, so 2 ** 100 is computed exactly. There is no fixed 64-bit wrap-around as in C or Java. OverflowError can occur with floats or some conversions, but not with ordinary int arithmetic.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.