subject

You wrote a program to find the factorial of a number. In mathematics, the factorial operation is used for positive integers and zero. What does the function return if the user enters a negative three? def factorial(number): product = 1 while number > 0: product = product * number number = number - 1 return product strNum = input("Enter a positive integer: ") num = int(strNum) print(factorial(num)) -6
1
-3
There is no output due to a runtime error.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 14:30
If the polar bear were taken out of the food chain what would happen to the seal population the seal population would diminish the seal population would grow dramatically the seal population would stay the same the seal population would decrease slightly
Answers: 1
question
Computers and Technology, 23.06.2019 01:30
Negative methods of behavior correction include all but this: sarcasm verbal abuse setting an example for proper behavior humiliation
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
For a typical middle-income family, what is the estimated cost of raising a child to the age of 18? $145,500 $245,340 $304,340 $455,500
Answers: 1
question
Computers and Technology, 23.06.2019 04:20
Which network media uses different regions of the electromagnetic spectrum to transmit signals through air? uses different regions of the electromagnetic spectrum to transmit signals through air.
Answers: 2
You know the right answer?
You wrote a program to find the factorial of a number. In mathematics, the factorial operation is us...
Questions
question
Chemistry, 18.12.2019 09:31
question
Mathematics, 18.12.2019 09:31
question
Mathematics, 18.12.2019 09:31
question
Social Studies, 18.12.2019 09:31
Questions on the website: 13722367