print(type("Hello World!"))
<class 'str'>
print(type(501))
<class 'int'>
print(type(8.33333))
<class 'float'>
student_name = "Colette Browning"
print(type(student_name))
<class 'str'>
# [ ] show the type after assigning bucket = a whole number value such as 16
bucket = 16
print(type(bucket))
<class 'int'>
# [ ] show the type after assigning bucket = a word in "double quotes"
bucket = "long"
print(type(bucket))
<class 'str'>
# [ ] display the type of 'single quoting' (use single quotes)
print(type('single quoting'))
<class 'str'>
# [ ] display the type of "double quoting" (use double quotes)
print(type("double quoting"))
<class 'str'>
# [ ] display the type of "12" (use quotes)
print(type("12"))
<class 'str'>
# [ ] display the type of 12 (no quotes)
print(type(12))
<class 'int'>
# [ ] display the type of -12 (no quotes)
print(type(-12))
<class 'int'>
# [ ] display the type of 12.0 (no quotes)
print(type(12.0))
<class 'float'>
# [ ] display the type of 1.55
print(type(1.55))
<class 'float'>
# [ ] find the type of the type(3) statement (no quotes) - just for fun
print(type(3))
<class 'int'>
# [ ] Review & run code
print("my number is " + "123")
print("my number is " + 123)
my number is 123
Execution Error
TypeError: can only concatenate str (not "int") to str
total_cost = 3 + 45
print(total_cost)
I removed the quotes from 45
48
school_num = 123
print(school_num)
#I removed the first statement
123
# Hypothesis: I predict it will be a float
print(type(3.3))
print(type(3))
print(3.3 + 3)
<class 'float'>
<class 'int'>
6.3