-4
\$\begingroup\$

enter image description here

my problem is that i can't use elipse in line 29 ore someting like that. line 29 = elife player_choice == '2':

\$\endgroup\$
  • 3
    \$\begingroup\$ Please post code, not screenshots of code. (That's easier for you and makes it simpler for us to help you. \$\endgroup\$ – Vaillancourt Nov 22 '19 at 17:10
  • \$\begingroup\$ You're using a elif out of nowhere, not following another elif or if. I fail to see the logic of what you're trying to do so it's hard for me to help you further. \$\endgroup\$ – Vaillancourt Nov 22 '19 at 17:16
  • \$\begingroup\$ You might want to start with drawing a flowchart of what behaviour you're after, then code that. The elif you have should go after the if, but you have some behaviour in the else, which should most likely go somewhere else, but since you have a second else... ??? \$\endgroup\$ – Vaillancourt Nov 22 '19 at 17:30
2
\$\begingroup\$

There is an else wrong indent in line 21. Add one more tab to it and in its code block. After try to rebuild.

Python use identation to make code blocks.

| improve this answer | |
\$\endgroup\$
-1
\$\begingroup\$

add one more tab before elif and prew lines.

Tabs is very impotent in python

the same numbers tabbed mean code in the same logical block

in your case if and elif is in different blocks but must be in the same

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ This answer would be better if it explained why this tab is needed, so users reading it understand not just how to solve this one error case, but how to avoid similar errors in future. \$\endgroup\$ – DMGregory Nov 22 '19 at 17:48

Not the answer you're looking for? Browse other questions tagged or ask your own question.