Program not working at all the commands are different to just basic

Question:
How to deal with this
Repl link:

code snippet
```end if
        End

It seems that you are trying to write python in a C interpreter.

If you go back to your python file, there are a few things that need adjustment.

here is your original code

print("whether the given number is odd or even")
number = int(input("enter the number:"))
if (number % 2 == 0)
print("the given number is odd")
else:
print ("the given number is even")
print("end of the program thanks for using our program")
end if

When you use if you need to also use the : like you did for else:

if (number % 2 == 0):

We also want the print statement to happen if it is true so we need to indent it.

if (number % 2 == 0):
  print("the given number is odd")

However this will actually be incorrect, so we need to change it to the given number is even.

if (number % 2 == 0):
  print("the given number is even.")

We also need to change print ("the given number is even") after else: to odd, and indent it as well.

if (number % 2 == 0):
  print("the given number is even.")
else:
  print ("the given number is odd.")

lastly instead of using end if or end if End
you can use exit() to stop the program when you are done.

So the whole thing should be

print("whether the given number is odd or even")
number = int(input("enter the number:"))
if (number % 2 == 0):
  print("the given number is even.")
else:
  print ("the given number is odd.")
print("end of the program thanks for using our program")
exit()

4 Likes