# review and run code name = "Collette" # string addition print("Hello " + name + "!") # comma separation formatting print("Hello to",name,"who is from the city")
Hello Collette! Hello to Collette who is from the city
# [ ] print 3 strings on the same line using commas inside the print() function "How are you today" , "What is your name" , "How old are you"
# review and run code print("I will pick you up @",6,"for the party")
I will pick you up @ 6 for the party
# review and run code number_errors = 0 print("An Integer of", 14, "combined with strings causes",number_errors,"TypeErrors in comma formatted print!")
An Integer of 14 combined with strings causes 0 TypeErrors in comma formatted print!
# [ ] use a print() function with comma separation to combine 2 numbers and 2 strings print("My name is Braeden, I am",16,"I love my dog willow.")
My name is Braeden, I am 16 I love my dog willow.
# [ ] get user input for a street name in the variable, street street=input("What is your street name?") # [ ] get user input for a street number in the variable, st_number st_number=input("What is you street number") # [ ] display a message about the street and st_number print("I live at",st_number,street)
I live at
# [ ] define a variable with a string or numeric value str=input(5) # [ ] display a message combining the variable, 1 or more literal strings and a number print("the number is 5")
the number is 5
# [ ] get input for variables: owner, num_people, training_time - use descriptive prompt text owner = input("What is you name") num_people = input("number of people") training_time = input("how long do you want to train") # [ ] create an integer variable min_early and "hard code" the integer value (e.g. - 5, 10 or 15) min_early = 10 # [ ] print reminder text using all variables & add additional strings - use comma separated print formatting print("the owner",owner,"has set the max number of people to",num_people,"you are alowed to train a mox of",training_time,"please show up",min_early)
the owner has set the max number of people to you are alowed to train a mox of please show up 10