Python HW 4. You work for an on-line game site. Your job is to develop a program
ID: 3703737 • Letter: P
Question
Python HW
4. You work for an on-line game site. Your job is to develop a program that accepts a user name and password. Write a Python script that prompts users for a user name and password. a. The user name should be at least 6 characters long and is stored in a list such that it can't be used again. b. The password can only be validated if the following conditions are met: At least 1 letter between [a-z] and 1 letter between [A-Z]. At least 1 number between [0-9]. . At least 1 character from the following list [S#@l. Minimum length 6 characters. Maximum length 16 characters.Explanation / Answer
import re count = 0 nameList = [] while True: x = 0 y = 0 name = input("What's your name? ") for i in nameList: if nameList.count(i) > 1: x=1 if (x != 1 and len(name) >= 6): nameList.append(name) password = input("Enter your password ") if (len(password) >= 6 and len(password)Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.