4.3.7: Positive, Zero, or Negative - Codehs.
Question/Test Case:
Write a program that asks the...
Computers and Technology, 15.12.2020 04:30 lauren21bunch
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!")
Answers: 3
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
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
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
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
Mathematics, 30.01.2021 04:30
Mathematics, 30.01.2021 04:30
Chemistry, 30.01.2021 04:30
English, 30.01.2021 04:30
English, 30.01.2021 04:30
Mathematics, 30.01.2021 04:30
Mathematics, 30.01.2021 04:30
Arts, 30.01.2021 04:30
Mathematics, 30.01.2021 04:30
Engineering, 30.01.2021 04:30
Advanced Placement (AP), 30.01.2021 04:30