Home python Python 3.8.6. SyntaXerror: Multiple Statements Found While Compiling A Single Statement. As...

Python 3.8.6. SyntaXerror: Multiple Statements Found While Compiling A Single Statement. As soon as I write ELSE:

Author

Date

Category

wrote:

a = 10
IF A & GT; ten:
 Print ("More")
 ELSE:

After “ELSE:” Press ENTER, and issues an error:

Help how to solve?


Answer 1, Authority 100%

  1. An extra penny in front of the else
  2. after ELSE must follow any expression (if you do not need anything, remove the else block)

Correct Option:

a = 10
IF A & GT; ten:
  Print ("More")
ELSE:
  Pass

or:

a = 10
IF A & GT; ten:
  Print ("More")

Answer 2

Else It is necessary without an arrogance regarding if

a = 10
IF A & GT; ten:
  Print ("More")
ELSE:
  PRINT ("LESS")

Answer 3

Thank you very much for your help.
In general, I solved everything so.
Posted by the code by the abbreviated option. Everything was performed without errors. Only the riddle still remains the same for non-abbreviated text. Most likely, shell perceives only metered information as well as it turned out, Linux’s command line, too.

Here is the code itself:
Print ("Yes") if a == 10 Else Print ("Another")


Answer 4

The reason is what I wrote somewhere else, and then copied to the IDLE. Do not do this.

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions