Skip to content

dexterpound/cat_names

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

catNames = []
while True:
    print('Enter the name of cat ' + str(len(catNames) + 1) +
      ' (Or enter nothing to stop.):')
    name = input()
    if name == '':
        break
    catNames = catNames + [name]  # list concatenation
print('The cat names are:')
#for name in range(len(catNames)):
    #print(name)

for i in range(len(catNames)):
    
    
    print(catNames[i], " : ", str(i))
    #print(catNames[i] + " " + str(i))
    #print(str(i),":",catNames[i])
    #print(catNames[i], " : ", str(i))
    #print(catNames[i], i, end=' ')
    #print(catNames[i],end=' ' + str(i))
    #print(catNames[i], i)
    #print(f"{catNames[i]} {str(i)}")

About

Python program that makes a list of cat names and then adds the index number to them.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages