Previous

If-Else Statements

2 / 6
Next

Operators that can be used to compare values include:

  • == for equality;
  • != for inequality;
  • < for less than;
  • <= for less than or equal to;
  • > for greater than; and
  • >= for greater than or equal to.
n = int(input())
if (n > 0):
  print(f"{n} is positive")
else:
  print(f"{n} is zero or negative")
Send

Division by zero

Hint
Beginner

Input two integers a and b and print the value of a divided by b.

Help
Solve
Reset
Run
Submit
 

Test results

Test result #
Expected output
Your output

Your email has been verified!