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(str Num)
print(factorial(num))
There is no output due to a runtime error.
O-3
01

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 19:30
Why is it a good idea to leave an interview being courteous and polite?
Answers: 1
question
Computers and Technology, 22.06.2019 02:00
Aletter or menu command that starts an action when the user presses the designated letter and the alt key together is called what?
Answers: 1
question
Computers and Technology, 22.06.2019 08:00
What best describes a career pathway in a lodging career? a worker starts out as an amusement attendant, then becomes a recreation worker, and then becomes a gaming worker within five years. a worker starts out as a bell hop, then becomes a night clerk, and then becomes a hotel manager within five years. a worker starting out as a tour guide, then becomes a travel clerk, and then becomes a travel agent within five years. a worker starts out as a server, then becomes a food preparer, and then becomes a head chef within five years.
Answers: 1
question
Computers and Technology, 22.06.2019 15:00
The three logical operators used to write compound conditions are "and," "or," and "not." a: true b: false
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
Mathematics, 07.12.2020 19:20
question
Social Studies, 07.12.2020 19:20
question
Mathematics, 07.12.2020 19:20
question
Physics, 07.12.2020 19:20
Questions on the website: 13722361