text = None text = input('Number: ') try: text = int(text) text = 2 * text print(text) except ValueError: pass # print(text, 'is not a fixed number') try: real = float(text) print(2 * real) except ValueError: pass # print(text, 'is not a floating point number') print(2 * text) # 2*10 + 0 = 20 # 20 * 10 + 5 = 205 # Python data types: # bool: {False, True} # int: {fixed two-complement + arbitrary precision} # float: IEEE 754 (double) # str: Unicode text # None: