Anonymous
Anonymous asked in Computers & InternetProgramming & Design · 6 months ago

Why might my else statement in an if,elif, and else statement in python not work?

4 Answers

Relevance
  • 6 months ago
    Favorite Answer

    Lots of possibilities here: wrong conditions, missing colon, wrong indentation, wrong statement order, unclosed parenthesis/bracket/brace/triple-quote on a previous line, and probably some other things.

    • Log in to reply to the answers
  • Chris
    Lv 7
    6 months ago

    Are we supposed to guess randomly?

    Or could you maybe, just maybe, add your goddamn code to the question?

    • Log in to reply to the answers
  • 6 months ago

    most common - improper "grammar", you've got something missing or an extra parenthesis or what-have-you

    often - improper logic or a typo (for example of the latter: letter O where there should be the number 0)

    • Log in to reply to the answers
  • 6 months ago

    Most of the time it is the combination of "and" and "or" statements. Programming must be exact.

    • Log in to reply to the answers
Still have questions? Get answers by asking now.