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, 22.06.2019 23:30
What is the digital revolution and how did it change society? what are the benefits of digital media?
Answers: 1
question
Computers and Technology, 23.06.2019 01:10
Problem 1 - hashing we would like to use initials to locate an individual. for instance, mel should locate the person mark e. lehr. note: this is all upper case. generate a hash function for the above using the numbers on your telephone. you know, each letter has a number associated with it, so examine your telephone keypad. generate 512 random 3 letter initials and take statistics on a linked list array size 512 to hold this information report how many have no elements, 1 element, 2 elements, does this agree with the hashing statistics distribution?
Answers: 1
question
Computers and Technology, 23.06.2019 07:30
What are ways to switch windows in excel? check all that apply. on the status bar, click the windows button, and then click the file name. on the task bar, click to display the excel jump list, and then click the file name. on the view tab, in the window group, click switch windows, and then click the file name. on the review tab, in the viewing group, click files, and then click the file name.
Answers: 1
question
Computers and Technology, 23.06.2019 17:00
What does the faves button do? a. users mark a web page as a favorite b. leads other readers to favor a specific page c. readers sort and align their favicons, or favorite icons d. leads users to a message board where they can post questions
Answers: 1
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, 04.09.2020 21:01
question
English, 04.09.2020 21:01
Questions on the website: 13722367