Reminders/important bits Flashcards
How do you calc 0o142?
142 = length 3
therefore 8^2 8^1 8^0
0o142 = 1* 8^2 + 4* 8^1 + 2* 8^0
How do you calc 0x142?
142 = length 3
therefore 16^2 16^116^0
0x142 = 116^2 + 416^1 + 2*16^0
How do you calc binary 011?
011 = length 3
therefore 2^2 2^1 2^0
011 = 0* 2^2 + 1* 2^1 + 1*2^0
Which is always bigger 0x number or 0o number ?
0x
Type([5]) …..
list
Type({5}) …..
set
Type((5)) …..
int
Type((5,)) …..
tuple
Type((‘5’)) …..
str
In ASCII is a and A odd or even?
Odd
What is the order of ASCII?
Digits (0-9) Capitals (A-Z) lowercase (a-z)
What is the function to change a character/number to ASCII?
ord()
What is the function to change a ASCII number to normal char/num?
chr()
What to remember about insert()?
insert( position , what_to_insert )
How is power ** binded?
right to left