The output of:
the7 = ['homelander', 'meave', 'black noir', 'deep']
print ('butcher' in the7)
What is ?
False
Name 3 data types in Python
Nombra 3 tipos de data en Python
what is:
1. Integer (e.g. 4)
2. Float (e.g. 4.0)
3. String (e.g. "hello")
4. Boolean
"Else If" in python
What is "elif"?
The OUTPUT of:
cookies = 10
for i in range (5):
cookies -=1
print ('nom nom COOKIE')
print ("I have", cookies+1, "cookies left")
OUTPUT:
nom nom COOKIE
nom nom COOKIE
nom nom COOKIE
nom nom COOKIE
nom nom COOKIE
I have 6 cookies left
The keyword we need to make a function.
What is "def"?
The output of:
number = []
number.append(1)
number.append(3)
number.append ([5,8])
print (number)
number.extend([10,14])
print (number)
What is:
[1,3,[5,8]]
[1,3,[5,8], 10,14]
How do I turn a user input into an integer? Do I have to? What happens if the user inputs a letter?
CODE:
user_input = input("Enter a number: ")
What is:
int(user_input)
Yes, if you want to use math operations.
There will be an error since you can't turn a letter into a number.
matriz = [ [2, 3], [7, 9] ]
print(matriz[0])
print(matriz[-1])
What is:
[2, 3]
[7, 9]
What is the name of the actor that played Elton John in 'Rocketman'
what is:
Taron Egerton
Name all the Beatles:
What is the outpout:
for i in range(10, 1, 2):
print(i)
Nothing
What is the name of the actor who played Drax in the MCU?
Dave Bautista
The output when uinput = "y" and uinput = "N"
CODE:
uinput = input("Do you like the weather? ")
if (uinput == 'y'):
print("super cool")
elif (uinput == 'n'):
print("cool me neither")
else:
print ("what do you mean")
What is:
super cool
what do you mean
The output of:
user_input = input("Enter a number:")
print (user_input * 5)
1. Input: 10
2. Input: a
What is:
1.1010101010
2. aaaaa
What's going to happen?
def hi():
print ("Hey there!")
def hello(word):
return ("Hello " + word)
name = "georgia"
hi()
What is:
Hey there!
Output of:
list = ['b','n','n']
index = 1
for c in range (len(list)):
list.insert(index,'a')
index +=2
print (list)
What is ['b', 'a', 'n', 'a', 'n', 'a']
The output of:
print (int((float(5.0) + int('2'))) * "hi ")
What is:
hi hi hi hi hi hi hi
The output of:
count = 0
while (count < 10):
print ("And I oop-")
count -=1
What is:
Infinity.
Who played as the Riddler in the movie:
Batman Forever
Who is:
Jim Carrey
What is the output:
matriz = [[1,0, 2], [8, 9, 6]]
print(matriz[1][1])
print(matriz[0][1])
What is:
9
0
The output of:
nums = [1,19,6,10,-4,12,4,18,20,17,-2]
total = 0
for i in range (len(nums)):
if (i % 2 == 0):
total += nums[i]
print (total)
What is 25?
thing1 = True
thing2 = False
print (thing1 and ((thing2 and thing1) or (not thing2)))
What is True?
temp = 65
The Output of:
if (temp < 65):
print ("It's cold!")
elif (temp > 65 and temp < 80):
print ("It's alright")
elif (temp >= 80 and temp <= 95):
print ("It's HOT")
else:
print ("It's SCORCHING HOT")
what is:
It's SCORCHING HOT!
First movie of the Marvel Cinematic Universe?
Iron Man
Who play the young Vito Corleone in the GodFather II?
Robert DeNiro