forked from kodorvan/stcs
The function allows you to write the number 0
This commit is contained in:
@@ -34,7 +34,7 @@ def is_number(value: str) -> bool:
|
|||||||
# Convert the string to a float
|
# Convert the string to a float
|
||||||
num = float(value)
|
num = float(value)
|
||||||
# Check if the number is positive
|
# Check if the number is positive
|
||||||
if num <= 0:
|
if num < 0:
|
||||||
return False
|
return False
|
||||||
# Check if the string contains "+" or "-"
|
# Check if the string contains "+" or "-"
|
||||||
if "+" in value or "-" in value:
|
if "+" in value or "-" in value:
|
||||||
|
Reference in New Issue
Block a user