Quick actions

cmd+k|ctrl+k

Navigation

Languages

variables/binary numbers

Snippet info

Language

Python

Visibility

public

Author

dylansiegelman

Created

2024-03-30T23:02:29.164254Z

Updated

2024-03-31T01:42:18.891136Z

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)
INFO