Anyway, for the "wrong_score" function. I suggest you to:
1) pass the "scorehome" and "scorevisitor" into the function.
2) replace this part of your code.
For the "startgame()" function, we went through that the "wrong_score()" should just return a True or False, so we don't need the continue. But you need change the elif and make it to another if-statement to add the scores when the when the "wrong_score()" returns True it would add the winning teams points.
1) pass the "scorehome" and "scorevisitor" into the function.
2) replace this part of your code.
elif scorehome > scorevisitor: winhome=winhome+1 return True else: winvisitor= winvisitor+1 return TrueThere is an error here, because "winhome" and "winvisitor" are not a local variable. Don't try to make the function calculate, just stick with checking the scores. So remove "winhome = winhome + 1" and "winvisitor= winvisitor+1" and tidy up the code with an else-statement.
For the "startgame()" function, we went through that the "wrong_score()" should just return a True or False, so we don't need the continue. But you need change the elif and make it to another if-statement to add the scores when the when the "wrong_score()" returns True it would add the winning teams points.
if wrong_score(): continue elif scorehome > scorevisitor: winhome=winhome+1 else: winvisitor=winvisitor+1
When my code doesn't work I don't know why **think** and when my code works I don't know why **think**