Ask coding questions

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

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

Commentshotnewtop
SushiPython (43)

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

WoodC1 (0)

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

SushiPython (43)

@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 (0)

@SushiPython I have just tried that and still no result

SushiPython (43)

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

StudentFires (327)
Health = input("do you have any medical health issues?) " "(y/n)"
WoodC1 (0)

@StudentFires thats what i have put i think

StudentFires (327)

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

SushiPython (43)

@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

StudentFires (327)

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

WoodC1 (0)

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

SushiPython (43)

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

WoodC1 (0)

@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 (43)

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