How can you assign the value 100 to the variable x in Python?
What is x = 100
Which type of brackets are needed to make a list?
What is square brackets []
How do you define a function?
What is def "function name"
What is the collection of objects inside [ ] called?
what is a list
What is the issue here:
1 i = 0
2 name = input("What is your name: ")
3 for i in range(5)
4 print(name, " is really cool!")
what is a colon in line 3
How to type cast a integer to a string
What is str()
list =['Canada', 'Panama', 'China', 'Japan', 'USA', 'Mexico', 'Uruguay', 'Portugal', 'Nigeria', 'England', 'Chad' ]
what index is Mexico in?
What is index 5
What's wrong with this code:
i = 0
while i < 5:
name = input("What is your name: ")
i+=1
print(name)
What is: printing and asking for your name 5 times and prints the last inputted name.
What's the output:
i = 33
if i < 31:
print("That's a small num!!")
elif i == 34:
print("This is equal to 34???")
elif i > 36:
print("THIS IS CRAZY")
else:
print("This is wack")
What is: This is wack
list = ["Dylan", "Victoria" "Nik", "Alisha", "Brooke", "Claire", "Sydney", "Joey" ]
length = len(list)
for i in range(length):
print(list[i])
What is a comma in line 1
Name the 5 Data types that we've learned
What is Integer, Float, String, Boolean, List
list =['Canada', 'Panama', 'China', 'Japan', 'USA', 'Mexico', 'Uruguay', 'Portugal', 'Nigeria', 'England', 'Chad' ]
what the output of the following code
print (list[-4])
What is Portugal
What's the difference between Parameters and Arguments.
What is: one is used in the definition of a function and another is sent to the function.
What's the output:
i = 34
if i < 31:
print("That's a small num!!")
elif i == 34:
print("This is equal to 34???")
elif i > 36:
print("THIS IS CRAZY")
else:
print("This is wack")
What is: This is equal to 34???
what's wrong here:
i = 0
while i > 5:
print(i)
i+=1
What is an infinite loop
What do each of the following print:
1.print("3" + "3")
2.print(3 +3 )
3.print("3" + 3)
What is 33, 6 and an error
AND
and how would it retrieve values?
What is a dictionary AND it uses a [key]
What's wrong with the code:
def some_thing(num1, num2):
result1 = num + 4
result2 = num2 - 4
return result1
print(result2)
What is: scoping issue since result2 is within the defined function.
code a dictionary using country and capital for the key and the value, create 3 key pair values
What is "code" I don't have enough time yall got it
I believe in you, and it was a fun summer camp with you all
what's wrong here:
user_num = int(input("input a number"))
print("the number you inputted is "+ user_num)
Code!
Ask the user for their name and the number of tacos they ate today. Store the data in two separate variables
your output should look like the following:
Whats your name?: Victoria
How many tacos have you ate today?: 10
Victoria has consumed 10 tacos today.
name = input("Whats your name?")
numTacos = input("How many tacos have you ate today?")
print(name," has consumed ",numTacos," tacos today.")
Why cant you find the "third" or "fourth" element in a dictionary.
What is an unordered data structure.
def a function that will iterates through a string
ask the user for an input
send that string to a function
the function will iterate through the string
and print each portion of the string
(I hope you learned how to at least make a function!)
What is "code" Victoria will check
Write a code that iterates through a string:
Make a list(min 4 items)
iterate through it using any loop of your choice
and print each of the items of that list
What is "Code" Victoria will check
What's the output, and how can we fix it
print("I had a blast being your camp leader/n")
print("you're all super smart and have a bright future ahead of yourselves!/n")
print("Have a great summer/n")
What is the wrong new line character