# math operators 1 + 1 1 - 1 1*1 (1)(1) # error! 1/0 1/1 1/100000 # scientific notation 1.1 / 100 1.2 / 100 1.3 / 100 # woah! what happened? # number types (integer and float) type(1) type(1.0) type(3/2) type(3//2) # more math operators 5 % 3 # modulo, think of it as the remainder 10 ** 3 16 ** (1/2) 2 ** -1 -5 ** 2 9 ** 1/2 # string stuff hello world "hello world" type("hello world") 'hello world' 'she said "hello"' 'hello' + 'ada' + 'lovelace' 'x' * 'y' 'HA' * 100 # comparison operators 5 > 3 -3 > -5 'A' < 'B' 'a' < 'B' 3 <= 4 4 <= 4 5 <= 4 1 == 2 1 != 2 2 == 2 2 == 2.0 type(2) == type(2.0) type(5 > 3) type(5 < 3) type(True) type(False) type(false) # boolean logic not False not True True or False True and False True and True not True or True not (True or True) # boolean logic with comparisons 10 < 1 or 10 > 5 10 < 1 and 10 > 5 1==1 or 2==2 and 3==4 (1==1 or 2==2) and 3==4 # truthy and falsy True == False True == True True == 'True' True == 1 True == 2 False == 0