# [ ] Review and run code for adding a pair of 2 digit Integers
23 + 18
# [ ] Review and run code for adding 2 strings
"my name is " + "Alyssa"
# [ ] Review and run code for adding a variable string and a literal string
shoe_color = "brown"
"my shoe color is " + shoe_color
# [ ] add 3 integer numbers
print(2+12+23)
37
# [ ] add a float number and an integer number
print(2.0+34)
36.0
# [ ] Add the string "This notebook belongs to " and a string with your first name
print("This notebook belongs to Braeden")
This notebook belongs to Braeden
# [ ] Create variables sm_number and big_number and assign numbers then add the numbers
sm_number=1
big_number=1000
print(sm_number+big_number)
1001
# [ ] assign a string value to the variable first_name and add to the string ", remember to save the notebook frequently"
first_name="Braeden"
print(first_name + ",remeber to save you notebook frequently,")
Braeden,remeber to save you notebook frequently,
# [ ] review & run code for assigning variables & using addition
add_two = 34 + 16
first_name = "Alton"
greeting = "Happy Birthday " + first_name
print(add_two)
print(greeting)
# [ ] review & run code for Integer addition in variables and in a print function
int_sum = 6 + 7
print(int_sum)
print(11 + 15)
print()
# string addition in variables and in print()function
hat_msg = "I do not wear " + "a hat"
print(hat_msg)
print("at " + "dinner")
# [ ] perform string addition in the variable named new_msg (add a string to "my favorite food is ")
fav_food="pizza"
new_msg = "My favorite food is"+fav_food
print(new_msg)
My favorite food is pizza
# [ ] perform Integer addition in the variable named new_sum (add 2 or more Integers)
new_sum = 2+57
print(new_sum)
59
# [ ] create and print a new string variable, new_msg_2, that concatenates new_msg + a literal string
new_msg_2=new_msg + ". It is delicious!!!"
print(new_msg_2)
My favorite food is pizza. It is delicious!!!
# [ ] Review & run code
print("my number is " + "123") #string, represents a text character
print("my number is " + 123) #number, with numeric value
# [ ] Review and run the code - then fix any Errors
#TypeError. 3 was int and was converted to string
total_cost = "3" + "45"
print(total_cost)
345
# [ ] Review and run the code - then fix any Errors
school_num = "123"
print("the street number of Central School is " + school_num)
the street number of Central School is 123
# [ ] Read and run the code - Then write a hypothesis for what you observe when adding float + int
# [ ] HYPOTHESIS: The addition of an int and a flt is a flt.
print(type(3.3))
print(type(3))
print(3.3 + 3)
<class 'float'>
<class 'int'>
6.3
# [ ] Review and run the code for properly and improperly formatted print statement
print("Hi!")
## improper format - non matching quotes
print("I like the morning")
Hi!
I like the morning
# [ ] Review and run the code
print('hi')
hi
# [ ] Review and run the code missing the closing parenthesis
print("where are my socks?")
where are my socks?
# { ] Review and run the code
print("my socks are in the wrong bin")
my socks are in the wrong bin
# [ ] Repair the syntax error
#ismatched quotations
print("my socks do not match")
my socks do not match
# [ ] Repair the NameError
#print is mispelled
print("my socks match now")
my socks match now
# [ ] Repair the syntax error
#no parenthesis at beginning
print("Save the notebook frequently")
Save the notebook frequently
# [ ] Repair the NameError
#variable name is all caps
student_name = "Alton"
print(student_name)
Alton
# [ ] Repair the TypeError
#total is a int and cannot be added to a string
total = "3"
print(total + " students are signed up for tutoring")
3 students are signed up for tutoring