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 02:00
Aisha has finished working on a word processing document that contains 15 pages. she has added some special elements in the first three pages, page 9 and 10, and page 15 from the document. she wants to print only these pages to see how they look. which option is the correct way to represent (in the print dialog box) the pages that aisha wants to print?
Answers: 1
question
Computers and Technology, 22.06.2019 04:00
When you collaborate or meet with a person or group online, it is called
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
As with any small island country, cuba has fewer natural resources than countries such as brazil. this affects their economy in that cuba a) exports only manufactured products. b) exports more products than it imports.. c) must import more products than it exports. d) has imposed trade barriers against the united states.
Answers: 3
question
Computers and Technology, 24.06.2019 00:50
Which of the following is not a key player in the sale of travel products?
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, 31.07.2021 17:30
question
Mathematics, 31.07.2021 17:30
question
Mathematics, 31.07.2021 17:30
question
English, 31.07.2021 17:30