Do Now

Type in the following code into a file and save:

a = input("What is your name? ")
# a = "cats and dogs"
# meow
print("Hello there, " + a)
  1. Read through the code and write down what you expect the printed results to be?

  2. Run the code and write down the actual printed result?

  3. Briefly describe what the # does?

  4. Briefly describe what input does?

Snap to Python

Convert the following to Python code: Snap Input

Swapping

Copy the following code into your editor.

a = "this sentence should go second"
b = "this sentence should go first."  
c = a 
a = b 
# your code starts here

# your code ends here
print(a)
print(b)

Run the program. What is the output?

Write code to swap the values of variables a and b.