variables/binary numbers

Run Settings
LanguagePython
Language Version
Run Command
print(bin(5)) print(int('0b101', 2)) #this is saying show the integer for that binary number #in base 2 instead of base 10 #your text creates a variable iq = 190 print(iq) poo = 200 print(iq + poo) # good rules for variables: #snake_case no caps and only underscore #start with lower case or underscore, cant start with number #case sensitive #dont overwrite keywords, meaning you cant use any words that are already in python food_cup = ('good') print(food_cup) fun = poo/4 print(fun) #constants, things that dont change #constants can be in caps PI = 3.14 PI = 0.4 print(PI) #dont creat a variable with underscores, these are called dunders a,b,c = 1,2,3 print(a) print(b) print(a + b + c)
Editor Settings
Theme
Key bindings
Full width
Lines