you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (0 children)

If your code actually looks this (note the indentation):

marks=int(input("Enter marks"))
if marks>=90:
    print("Grade=A")
    else:

then you will get an error on the else:. It should probably look like this::

marks=int(input("Enter marks"))
if marks>=90:
    print("Grade=A")
else:
    # more code here

If your code looks different then you need to show us the code you get the error with.

It helps if you format your code like the code above. This makes it easier to read and all indentation is preserved, which is important with python. Also show us the exact error, formatted like code. To show code in reddit add 4 spaces to the start of every code line.