forked from leighMichaelForrest/lpthw
-
Notifications
You must be signed in to change notification settings - Fork 2
/
ex7.py
39 lines (37 loc) · 1.03 KB
/
ex7.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Write "Mary had a little lamb." onto the screen.
print("Mary had a little lamb.")
# print "Its fleece was as white as snow." to the screen, injecting
# 'snow' to the curly braces position.
print("Its fleece was as white as {}.".format('snow'))
# Write "And everywher that Mary went."
print("And everywhere that Mary went.")
# Write 10 periods to the screen
print("." * 10) # what did that do?
# initialize end1 to "C"
end1 = "C"
# initialize end2 to "h"
end2 = "h"
# initialize end3 to "e"
end3 = "e"
# initialize end4 to "e"
# end4 = "e"
# initialize end5 to "s"
end5 = "s"
# initialize end6 to "e"
# end6 = "e"
# initialize end7 to "B"
end7 = "B"
# initialize end8 to "u"
end8 = "u"
# initialize end9 to "r"
end9 = "r"
# initialize end10 to "g"
end10 = "g"
# initialize end11 to "e"
# end11 = "e"
# initialize end12 to "r"
# end12 = "r"
# watch that comma at the end. Try removing it to see what happens.
print(end1 + end2 + end3 + end3 + end5 + end3, end=' ')
# Write out "Burger" on the same line.
print(end7 + end8 + end9 + end10 + end3 + end9)