Answer:
import random
paswrd = input("Enter Pass: ")
while len(paswrd) < 8:
print('Password not long enough.')
paswrd = input("Enter Pass: ")
paswrd = paswrd.replace('e', '@')
paswrd = paswrd.replace('E', '@')
paswrd = paswrd.replace('s', '$')
paswrd = paswrd.replace('S', '$')
paswrd = paswrd.replace('t', '+')
paswrd = paswrd.replace('T', '+')
paswrd = paswrd.capitalize()
paswrd = paswrd + (str(random.randint(1,999)))
print(paswrd)
Step-by-step explanation:
- Take the password as input from user.
- Replace the alphabets with relevant characters.
- Capitalize the password.
- Finally display the password.