subject

What will be the output of this program? number = 5
greater_than_zero = number > 0
less_than_zero = number < 0

if greater_than_zero:
print(number)
if less_than_zero:
print(number + 1)
if greater_than_zero and less_than_zero:
print(number + 2)
if greater_than_zero or less_than_zero:
print(number + 3)

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 23:30
Define a function printfeetinchshort, with int parameters numfeet and numinches, that prints using ' and " shorthand. ex: printfeetinchshort(5, 8) prints: 5' 8"
Answers: 1
question
Computers and Technology, 23.06.2019 08:00
Match the items with their respective descriptions.
Answers: 1
question
Computers and Technology, 23.06.2019 17:00
*! 20 points! *jeff wants to create a website with interactive and dynamic content. which programming language will he use? a. dhtml b. html c. css d. javascript
Answers: 1
question
Computers and Technology, 23.06.2019 19:30
What are loans to a company or government for a set amount of time
Answers: 1
You know the right answer?
What will be the output of this program? number = 5
greater_than_zero = number > 0
l...
Questions
question
Mathematics, 05.07.2020 22:01
Questions on the website: 13722360