Skip to content
← Back to Community
Please help me debug!
Profile icon
[deleted]

Hello, this program uses many questions about you to create a personalized password. When I run the program, this happens:
Any suggestions or comments are welcomed.

Screen Shot 2020-04-19 at 1.20.12 PM

Answered by UniqueOstrich18 [earned 5 cycles]
View Answer
Voters
Profile icon
NikolaiSazonov
Profile icon
ohyea
Profile icon
asdjfhjasdhfelh
Profile icon
Yeetusdeletus12
Profile icon
studentAlfredAl
Profile icon
Codemonkey51
Profile icon
UniqueOstrich18
Comments
hotnewtop
Profile icon
UniqueOstrich18

On line 60, change it to:

(''.join(choice((str.upper, str.lower))(c) for c in sentence3))

Change line 56 to:

"""

Change line 61 to:

"""

Change line 41 to:

fortune1 = ''.join(choice((str.upper, str.lower))(c) for c in sentence1)

It should work after you make those changes.

The fixed program is at https://repl.it/@UniqueOstrich18/Password-writer, if you just want to copy the code.

There are multiple fixes you need to make because I discovered more issues.

If this was helpful, please mark it as the answer.

Profile icon
[deleted]

@UniqueOstrich18 Thank you, I appreciate the help!

Profile icon
Codemonkey51

That's because on line 60 you didn't close all the parentheses just add ) to the end of line 60 and it should work

Profile icon
UniqueOstrich18

@Codemonkey51 Did you actually test that? If you just add ) to the end of line 60, it won't work because there are more issues.

Profile icon
Codemonkey51

I did test although the only other error I found was sibling not defined @UniqueOstrich18 ¯_(ツ)_/¯

Profile icon
UniqueOstrich18
Profile icon
elonmaks

Hi, @hendryxu . Missing parenthesis at the end of line 60, that's why syntax error occurs. This happens because Python parsing your script file and find syntax error after reading a file and stops after it. And says that error is located before line 65. And you should find it before line 65.