week-2 #2

Merged
Kenwood merged 7 commits from week-2 into master 2021-02-02 20:57:11 -05:00
1 changed files with 16 additions and 0 deletions
Showing only changes of commit a79e01ee28 - Show all commits

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)))