Completed 5-10 Checking Usernames

This commit is contained in:
cheeks 2025-01-26 13:30:21 -05:00
parent 255bdaf13c
commit 52e22103bc

View File

@ -0,0 +1,20 @@
# Exercise 5-10 Checking Usernames
# Learning Objective: Create list and verify uniqueness of each entry.
currentUsers = ['Tex', 'Spert', 'klumps20', 'porridgeboi', 'tonythetiger']
#print(currentUsers)
lowerCurrentUsers = []
for user in currentUsers:
lowerCurrentUsers.append(user.lower())
#print(lowerCurrentUsers)
newUsers = ['randobob', 'stoopidpeet', 'tex', 'porridgeboi', 'calebrini']
for user in newUsers:
if user in lowerCurrentUsers:
print(f"Sorry, {user} is taken, please try another username.\n")
else:
print(f'The username {user} is available.\n')