February 2024
Beginner
352 pages
8h 16m
English
Now we are going to do a bunch of exercises where you just type code in and make it run. I won’t be explaining this exercise because it is more of the same. The purpose is to build up your chops. See you in a few exercises, and do not skip! Do not paste!
Listing 7.1: ex7.py
1 print("Mary had a little lamb.")
2 print("Its fleece was white as {}.".format('snow'))
3 print("And everywhere that Mary went.")
4 print("." * 10) # what'd that do?
5
6 end1 = "C"
7 end2 = "h"
8 end3 = "e"
9 end4 = "e"
10 end5 = "s"
11 end6 = "e"
12 end7 = "B"
13 end8 = "u"
14 end9 = "r"
15 end10 = "g"
16 end11 = "e"
17 end12 = "r"
18
19 # watch end = ' ' at the end. try removing it to see what happens
20 print ...Read now
Unlock full access