Create creating_passwords.py

This commit is contained in:
Joe S 2021-01-16 23:22:49 -05:00
parent 2f215aa45b
commit a79e01ee28
1 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,16 @@
if __name__ == '__main__':
favorite_color = input('Enter favorite color:\n')
pets_name = input('Enter pet\'s name:\n')
favorite_number = input('Enter a number:\n')
print('You entered: {0} {1} {2}\n'.format(favorite_color, pets_name, favorite_number))
first_password = '{0}_{1}'.format(favorite_color, pets_name)
second_password = '{0}{1}{0}'.format(favorite_number, favorite_color)
print('First password: {0}'.format(first_password))
print('Second password: {0}\n'.format(second_password))
print('Number of characters in {0}: {1}'.format(first_password, len(first_password)))
print('Number of characters in {0}: {1}'.format(second_password, len(second_password)))