Create creating_passwords.py
This commit is contained in:
parent
2f215aa45b
commit
a79e01ee28
|
@ -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)))
|
||||
|
Loading…
Reference in New Issue