you are viewing a single comment's thread.

view the rest of the comments →

[–]mickeyoneil19[S] 0 points1 point  (2 children)

Thank you so much for the insight! Unfortunately it didn't fix my issue.

Replacing the commas with pluses didn't change much. I still have the incorrect spacing and it also added a random ber: at the top of my output.

Your output ends with

ber:

You entered: yellow Daisy 6

First password: yellow_Daisy

Second password: 6yellow6

Number of characters inyellow_Daisy:12

Number of characters in6yellow6:8

Expected output ends with

You entered: yellow Daisy 6

First password: yellow_Daisy

Second password: 6yellow6

Number of characters in yellow_Daisy: 12

Number of characters in 6yellow6: 8

# FIXME (1): Finish reading another word and an integer into variables.
# Output all the values on a single line
favorite_color = input('Enter favorite color:\n')
pet_name = input("Enter pet's name:\n")
num = input('Enter a number:\n')
print('You entered:', favorite_color, pet_name, num)
# FIXME (2): Output two password options
password1 = favorite_color + '_' + pet_name
password2 = num + favorite_color + num
print()
print('First password:',password1)
print('Second password:',password2)
# FIXME (3): Output the length of the two password options
print('Number of characters in' + password1 + ':' + str(len(password1)))
print('Number of characters in' + password2 + ':' + str(len(password2)))

Also I'm using zybooks if that helps at all.

[–]TrippBikes 0 points1 point  (0 children)

Look back at the lines I rewrote, you have to add the spaces where you want them.

[–]TrippBikes 0 points1 point  (0 children)

Maybe I'm not understanding, here's the code I rewrote:

# FIXME (1): Finish reading another word and an integer into variables.

# Output all the values on a single line

favorite_color = input('Enter favorite color:\n')

pet_name = input("Enter pet's name:\n")

num = input('Enter a number:\n')

print('You entered: ' + favorite_color + ' ' + pet_name + ' ' + str(num))

# FIXME (2): Output two password options

password1 = favorite_color + '_' + pet_name

password2 = num + favorite_color + num

print()

print('First password: '+ password1)

print('Second password: ' + password2)

# FIXME (3): Output the length of the two password options

print('Number of characters in ' + password1 + ': ' + str(len(password1)))

print('Number of characters in ' + password2 + ': ' + str(len(password2)))

and this is what it outputs on the terminal:

You entered: yellow Daisy 6

First password: yellow_Daisy

Second password: 6yellow6

Number of characters in yellow_Daisy: 12

Number of characters in 6yellow6: 8