mobile theme mode icon
theme mode light icon theme mode dark icon
Random Question Random
speech play
speech pause
speech stop

Check if a number is positive in Python

It looks like you have a typo in your code. The word "nonly" should be spelled "only".

Here's the corrected version of your code:
```
if only $x > 0:
print("$x is positive")
```
This will check if `x` is greater than 0, and if it is, it will print the message "$x is positive".

Knowway.org uses cookies to provide you with a better service. By using Knowway.org, you consent to our use of cookies. For detailed information, you can review our Cookie Policy. close-policy