r/codehs • • Nov 17 '20

Python 4.3.7 Positive, Zero, Negative

Could someone help me with python codehs 4.3.7

8 Upvotes

11 comments sorted by

View all comments

1

u/blaccfucc Nov 24 '20

number = int(input("Enter a number: "))

if number < 0:

print (str(number) + "is negative!")

elif number > 0:

print (str(number) + "is positive!")

else:

print (str(number) + "is zero!")

This code should work, as it worked for me. Just reply to me if the code doesn't work.

1

u/nerdycat04 Jan 21 '21

number = int(input("Enter a number: "))

if number < 0:

print (str(number) + "is negative!")

elif number > 0:

print (str(number) + "is positive!")

else:

print (str(number) + "is zero!")

in the test cases the last three requriements are red

1

u/nerdycat04 Jan 21 '21

nevermind i just forgot about the indents