Ask coding questions

← Back to all posts
what is wrong with my code?
WoodC1

Can someone please tell me what is wrong with my code or fix it please as it was just working with no changes and now that ive run it again it is showing syntax errors that make NO sense and im not getting a bit annoyed with it. i beg for someone to help me. thanks
edit: this is just a code ive tryed to program while we are in lockdown to show my family and teachers

Voters
IsabelaBARRETO
Comments
hotnewtop
SushiPython

Hey, on line 7 you forgot to close the parentheses.

WoodC1

@SushiPython ive just done that but still im having a syntax error for line 8

SushiPython

@WoodC1 ah, I see. On line 7 double check you closed the parentheses and make the variable ‘Health’ lowercase to be consistent with the rest of the referencing. That works for me.

WoodC1

@SushiPython I have just tried that and still no result

SushiPython

@WoodC1 you’re sure? That works for me. What’s the error?

xxpertHacker

Is this your code?

xxpertHacker
WoodC1

@StudentFires thats what i have put i think

xxpertHacker

@WoodC1 Yeah, you did, that's the error.

SushiPython

@WoodC1 Be sure that line 7 ends in parentheses. It doesn’t in the code. I forked your project and made my suggested changes, there’s no errors. Check my profile

WoodC1

@StudentFires so how do i fix it

xxpertHacker

@WoodC1 Look at lines 1-6, they end with a ).

WoodC1

@SushiPython could you screen shot and send me where the parenthesis need to be please

SushiPython

@WoodC1 Right at the end of line 7. Nowhere else. If you don’t know how to do that, look at my profile.

WoodC1

@SushiPython ah i see., sorry i didnt realise where u ment byt i have done it and now my code works thank you so much this really helps. have a good day :)

SushiPython

Sure np! You can mark this help message as solved. @WoodC1