Learning Circle : python #1 - ex7
This commit is contained in:
parent
070ef33f38
commit
72ed0f808e
3 changed files with 23 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
|||
manifest~
|
||||
*.py~
|
||||
*.org~
|
||||
*.org#
|
||||
|
|
21
youngjin.han/python-the-hard-way/ex7.py
Normal file
21
youngjin.han/python-the-hard-way/ex7.py
Normal file
|
@ -0,0 +1,21 @@
|
|||
print("Mary had a little lamb.") # print scipts
|
||||
print("Its fleece was white as {}.".format('snow')) # print scipts
|
||||
print("And everywhere that Mary went.") # print scipts
|
||||
print("." * 10) # what'd that do? # print dot 10 times
|
||||
|
||||
end1 = "C" # define a character
|
||||
end2 = "h" # define a character
|
||||
end3 = "e" # define a character
|
||||
end4 = "e" # define a character
|
||||
end5 = "s" # define a character
|
||||
end6 = "e" # define a character
|
||||
end7 = "B" # define a character
|
||||
end8 = "u" # define a character
|
||||
end9 = "r" # define a character
|
||||
end10 = "g" # define a character
|
||||
end11 = "e" # define a character
|
||||
end12 = "r" # define a character
|
||||
|
||||
# watch end = ' ' at the end. try removing it to see what happens
|
||||
print(end1 + end2 + end3 + end4 + end5 + end6, end=' ') # print "Cheese "
|
||||
print(end7 + end8 + end9 + end10 + end11 + end12) # print "Burger"
|
|
@ -13,4 +13,4 @@
|
|||
- ex6.py
|
||||
- + is to add two string array.
|
||||
- ex7.py
|
||||
-
|
||||
- none
|
||||
|
|
Loading…
Reference in a new issue