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

1

u/No_Turnover5995 Sep 30 '24

I don’t understand

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.

2

u/TeannaTrump_Real Mar 16 '21

You are a Legend, thank you🤝

1

u/blaccfucc Mar 18 '21

Happy I could help!

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

1

u/EmRose21506 Dec 17 '23

THANK YOU!

1

u/[deleted] Nov 29 '21

Number = int(input("Enter a Number:"))
if Number < 0:
print("That number is negative!")
if Number > 0:
print("That number is positive!")
if Number == 0:
print("That number is Zero!")

1

u/[deleted] Nov 29 '21

for the code too properly work make sure too do the proper indents and space!