I need help writing a program in Python that asks the user to select a nickname. The program should follow these rules and do these two things.
The rules for usernames are:
- There is a list of nicknames that the user cannot use.
banned_nicknames = [ "system", "administrator", "yourmom"]
- The nickname can not be empty/blank.
The program should do this: If the user types a nickname that violates either rule, the program should say that nickname is not allowed and ask again, repeating until the user enters an acceptable name.
The program should also do this: Once the user types an acceptable nickname, the program should just print “Your nickname is BLANK” where BLANK is replaced with whatever the user entered, and the program exit.
THE PROGRAM SHOULD READ LIKE THIS:
Select a username: system That username is not allowed. Select a username: That username is not allowed. Select a username: GTR Your username is GTR