In [10]:
# Exercise 2-1.
# this is because these are special number in python, binary starts with
# 0, Python 3 does not allow this. The numbers must express their type,
# i.e. 0b for binary 0x for hex and 0o for octal.
binary = 0b010001
hexidecimal = 0xFFF
octal = 0o1237
print(binary, hexidecimal, octal)
In [11]:
# Exercise 2-2.
5
x = 5
x + 1
Out[11]:
In [ ]:
# Exercise 2-3.