I have no idea what is wrong please help ASAP
JacksonOnSticks (7)

Ok so I'm new to all this coding stuff and I'm taking a class for coding and this is a grade and I really need help can someone please inform me to what my error is and how to fix it

You are viewing a single comment. View All
ethan10022 (1)

I'm pretty sure the else statement in line 28 contradicts the if statement in line 30. This else statement says that if the age is anything greater than 17, the code breaks. You could try removing the else statement completely. I'll mess around with it and see if I can find something.

ethan10022 (1)

Also, I'm not quite sure what you want the code to detect, so it's hard for me to change anything to make it work better. I would try changing the else statement to a specific if statement, where if (whatever) isnt equal to (whatever2), it says goodbye. To ellaborate on the problem with the else statement, its saying that if you dont meet the parameters for age<17, it says goodbye. That means that even if your if statement for having an age of 18 or higher allows you to qualify, it won't go through due to the else statement before it. Also, your statements appear to be overly complicated. Your if statements have multiple parameters. Instead, you should make it so that it is impossible to proceed without meeting the parameters. for example, if you want them to be 16, 57 inches, and have completed high school, you make 3 seprate if statements. are you 16? if yes, how tall are you? if you are 57 inches, have you completed high school? then proceed from there. Hope this helps, reply if I didn't make any sense or you need more help. This is my first time replying to one of these, so sorry in advance if its confusing.

ethan10022 (1)

no problem, is it working now? @JacksonOnSticks