diff --git a/2/2.14/2.14 Creating passwords/creating_passwords/creating_passwords.py b/2/2.14/2.14 Creating passwords/creating_passwords/creating_passwords.py new file mode 100644 index 0000000..f6837c2 --- /dev/null +++ b/2/2.14/2.14 Creating passwords/creating_passwords/creating_passwords.py @@ -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))) +