MENU
Question -

How many ways are there in Python to represent an integer literal ?



Answer -

Python allows three types of integer literals :

  1. Decimal (base 10) integer literals.
  2. Octal (base 8) integer literals.
  3. Hexadecimal (base 16) integer literals.
For example, decimal 12 will be written as 14 as octal integer and as OXC as hexa decimal integer. (12)10 = (14)8 = (OXC)16. (as hexa decimal)

Comment(S)

Show all Coment

Leave a Comment

Free - Previous Years Question Papers
Any questions? Ask us!
×