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)


17 4095 671

In [11]:
# Exercise 2-2.

5
x = 5
x + 1


Out[11]:
6

In [ ]:
# Exercise 2-3.