Python Syntax
How do you combine two strings
String1 + string2
What is python syntax for creating a variable and setting it equal to the number 10
Variable_name = 10
How does one define a multi-line string in python
" " " Like this " " "
What character begins a comment in python
#
What is the value of total_cost that gets printed Total_cost = 5 Total_cost += 10 Print (total cost)
15
What number is saved to exponented_variable in the following expression 2 ** 4
16
What is the value of modulo_variable in the following expression Modulo_variable = 14%4
2
What is the output of the following code Cool_number = 12 + 30 Cool_number *5 Print (cool_number)
42
What is the difference between float and an int
A float represents decimal quantities. An int represents whole numbers
This produces a SyntaxError
Answer= "is this an error'
This defined variable is a string
Cool_variable_3 = "important message!"
What function outputs text to the terminal
Print ()
What happens when running the following code Message = what a cool message ! Print (message)
Python throws a syntax error because the string is not surrounded by quotes