Skip to content

Commit 64cc025

Browse files
authored
Add files via upload
1 parent 001ccc5 commit 64cc025

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

allMyCats1.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
print('Enter the name of cat 1:')
2+
catName1 = input()
3+
print('Enter the name of cat 2:')
4+
catName2 = input()
5+
print('Enter the name of cat 3:')
6+
catName3 = input()
7+
print('Enter the name of cat 4:')
8+
catName4 = input()
9+
print('Enter the name of cat 5:')
10+
catName5 = input()
11+
print('Enter the name of cat 6:')
12+
catName6 = input()
13+
print('The cat names are:')
14+
print(catName1 + ' ' + catName2 + ' ' + catName3 + ' ' + catName4 + ' ' + catName5 + ' ' + catName6)

allMyCats2.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
catNames = []
2+
while True:
3+
print('Enter the name of cat ' + str(len(catNames) + 1) +
4+
' (or enter nothing to stop.):')
5+
name = input()
6+
if name == '':
7+
break
8+
catNames = catNames + [name] # list concatenation
9+
print('The cat names are:')
10+
for name in catNames:
11+
print(' ' + name)

0 commit comments

Comments
 (0)