subject

4.3.7: Positive, Zero, or Negative - Codehs. Question/Test Case:
Write a program that asks the user for a number. Report whether that number is positive, zero, or negative.

Problem/Error:
File "main. py", line 5
if number < 0:
^
SyntaxError: invalid syntax

My code:
print("Enter a number to see if it's positive, negative, or zero!")

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

if number < 0:
print(str(number) + "That number is negative!")
elif number > 0:
print(str(number) + "That number is positive!")
else number == 0:
print(str(number) + "That number is zero!")


4.3.7: Positive, Zero, or Negative - Codehs.

Question/Test Case:Write a program that asks the use

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
What operating system is a smartphone most likely to use? 1.bsd 2.mac os x 3.symbian 4.linux
Answers: 1
question
Computers and Technology, 22.06.2019 02:10
3. (5 points) describe what would be printed by the code below or what error would occur. const char* cstr = "0123456"; const char* ptr = & cstr[4]; cout < < ptr[-1] < < ptr < < endl; 1 4. (5 points) theseus has been trapped in a maze with a minotaur, which is trying to capture him. each round, theseus and the minotaur move through the maze; theseus towards the exit, and the minotaur towards theseus. theseus can move in any of the four cardinal directions, or he can wait for a round to see how the minotaur moves. write code that creates a data type to represent the possible moves that theseus could make.
Answers: 3
question
Computers and Technology, 22.06.2019 17:30
Rachel completed typing an official document with a word processing program. she wants to make sure that her document has no typographical errors. she also wants all headings to have the same font. which features in a word processing program should she use? rachel should use the feature in a word processing program to find typographical errors. she should apply to have uniform headings.
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
The next button in the review section shows the next available comment. next slide with no comment. previous comment. edited comment.
Answers: 1
You know the right answer?
4.3.7: Positive, Zero, or Negative - Codehs. Question/Test Case:
Write a program that asks the...
Questions
question
Mathematics, 30.01.2021 04:30
question
English, 30.01.2021 04:30
question
Mathematics, 30.01.2021 04:30
question
Arts, 30.01.2021 04:30
question
Engineering, 30.01.2021 04:30
Questions on the website: 13722361