Question-44: Which of the following are valid single number in Python?
- print(99_99_99_99)
- Get all Questions and Answer from here
- You need to have paid subscription to access all questions
- Thanks for considering Python Certification Material
Answer : A,B,C
Exp : All four statement in Python will work. However, Option-4 represent 4 different numbers, which are separated by “,” . So there 4 times 99 printed. But remaining all 3 represent single number.
- Type is a characteristic in a programming language which determine the numerical maximum and minimum possible values.
- Based on the type determined by Python will decide, how that literal should be stored in Memory.
- Do you know Python allows “_” in number value? See the example below. This feature is specific to Python 3.6 and above. It was done to improve readability.
You can access to full explanation to question and answer from this page.