anonymous
  • anonymous
i have a slight hitch in a small piece of code consider a nested if else .....it is showing an error on the else line (which is within another else)......can somebody help me out with right syntax?
MIT 6.00 Intro Computer Science (OCW)
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
schrodinger
  • schrodinger
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
TuringTest
  • TuringTest
you can't have an else without an if first consider using various combinations of if, elif (else if), and else in that order
anonymous
  • anonymous
you might want to use proper blocks for nested ifs. for example if { if{ ... code. } else { } } else { } basically u need to understand you indentations. if you want to put a nested if in your if, u need to create a block with {} and add your nested if-else in there.
anonymous
  • anonymous
to answer the question better it helps if you post the code. from the sound of how you worded it you have an if/else statement and then just an else statement nested within the first else? if so you need the pairing if statement also nested under the same first else statement like this: if: code else: code if: code else: code similar to what onyrock posted but im assuming your programming in python not c so you dont use the brackets

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
ronin12 is right. better to post the code.

Looking for something else?

Not the answer you are looking for? Search for more explanations.