What does 'hello'[::-1] return in Python?
'elloh'
I need to test if something is true or false?
boolean logic
what would this output
print('hey whats up \n not much what about you')
hey whats up
not much what about you
if 5 == 6:
print('h')
else:
print('y')
which letter will print
y
what defines a function
def
Which method converts all characters of a string to uppercase?
upper()
I need to repeat code a number of times
a loop
what is the order of operations in coding when doing math
pemdas
what does the if statement test
if something is false or true
for i in range 3: print(i)
0 1 2
can you add strings together true or false
true
what do you do if you get an error that you cant fix
let me know if this one is too hard btw
error check and patch
what does 10 % 3 =
1
is (if not) something you can use and if so what does it do
it tests if its not true or not false and is real
why do we write return at the end of a block
returns the value to the begin action
when using len what would len('python') output
6
if break breaks out of the loop what does continue do?
continue in the loop
what is a integer
whole number
x = 0
if x == 0:
print('yo')
yo
what happens if I forget to close a while loop
crashes/runs infinite number of times
What does 'banana'.count('a') return?
3
what is the segment of a string
slice
what is a float
scientific number or .deci number
x = 0
if x == '0':
print(yo')
error
what does the else statement do and how does it reelate to false (i know this isnt the subject but its a good question)
* the else statement cuases one or more statement to execute when the statement is false *