# File: twoplustwo.py # show the diffeence between strings and numbers when printing # # Matt Bishop, ECS 10, Winter 2012 # # # basic printing # # first, the simple way print("2 + 2 =", 2 + 2) # # now, see what happens with 2 print statements print("2 + 2 =") print(2 + 2) # # and we'll put the output on the same line print("2 + 2 =", end=' ') print(2 + 2) # # finally, another example of using "end" print("2 + 2 = ", end='>>>') print(2 + 2, end="<<<")