What type of collections uses []?
List
What is the output
print("Hello world"*3)
Hello World Hello world Hello World
Find the Error.
print(Hello World)
print("Hello World")
There needed to be Quotation marks around Hello World
What does this equation equal
print((2+2) * 9 + 10)
46
What is the data type.
"10"
List three types of conditionals in python.
If, Elif, Else
What is the output?
for i in range (1,5):
print("Hello World")
Hello World
Hello World
Hello World
Hello World
Find the error.
name = input("What is your name")
print(Name)
name = input("What is your name")
print(name)
name in the print needed to be lower case.
What does this equation equal?
print(2//3+6%67)
6
Name 4 data types.
String, Integer, float, boolean.
Which Type of python do we use.
A Python 1
B Python 2
C Python 3
D Python 4
C Python 3
What is the output if x = 15
x =
if x < 18:
print(x + 10)
else:
print(x-10)
25
Find the Error(s).
book = []
for i in range (5):
books.append(input("Next Author: "))
books.sort()
Print (books)
books = []
for i in range (5):
books.append(input("Next Author: "))
books.sort()
print (books)
There needed to be a s in books = [].
print needed to be lowercase.
What does this equation equal?
print(5+6//97%3-5*32)
-155
Data type that can have only one of two possible values.
Boolean
Who created python?
Double points if you get the year.
Guido van Rossum
1991
What is the output if number 1 = 5 and number2 = 10
number1 = int(input("Pick one number"))
number2 = int(input("Pick one number"))
print((number2, number1))
(10, 5)
Find the Errors.
def product_value(x, y):
print(x*y)
Product_value(5 10)
def product_value(x, y):
print(x*y)
product_value(5 ,10)
product_value needed to be lowercase.
Comma needed between 5 and 10.
print(5**3+(9//3)-8%5*9/3)
119
True or false
Can you add a Float and Integer.
True
Name 3 coding languages that came before python.
Java, C++, Binary,SQL and PHP
What does this print.
my_grid = []
for i in range(3):
my_grid.append([0]*3)
for row in range(3):
for col in range(3):
if row < 3 or row > 4:
my_grid[row][col]=1
print_board(my_grid)
1 1 1
1 1 1
1 1 1
Find the Errors.
total=0
for i in range(3):
next=int(input(test score: ))
total=total+next
total=total/3
Print(total)
total=0
for i in range(3):
next=int(input("test score:" ))
total=total+next
total=total/3
print(total)
prints need to be lowercase.
quotation around test score
What does this equation equal?
print(95//6*9+-6%909+3-(23*9))
834
Write a line of code that takes a given string and turns it into a Integer.
string_number = "12345"
integer_number = int(string_number)
print(integer_number)