Computers and Technology, 10.11.2020 17:20 chloeboo
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
There is no output due to a runtime error.
-3
Answers: 1
Computers and Technology, 22.06.2019 01:30
What kind of motivation is katrina showing? use the drop-down menu to complete the statement. katrina is using motivation because she is personally interested in learning more.
Answers: 2
Computers and Technology, 23.06.2019 06:10
The head restraint should be adjusted so that it reaches a.the top of your ears b.the base of your skull c.the top of the head
Answers: 1
Computers and Technology, 23.06.2019 09:30
:you areto design the controller for alight that functions both as an ordinary light and also as a motion activated light and alarm. a.if the manual switch s is on, then the light l is on. b.besides the manual switch, there is a motion detector, m1, which activatesthis light.c.if motion is detected but the light is on anyway because s is on, only then a secondoutput a, an alarm, is turned on. d.the disable switch, d, disables the motion activated light and alarmbut leaves manual control operation of the light using switch s.(i)read the problem statement and clearly identify the inputs and outputs for the circuit you are designing. (ii)create the truth table for this system; include the light, alarm, switch, disable, and the motion sensor.(iii)draw a schematic of this system.
Answers: 1
Computers and Technology, 24.06.2019 10:30
You're programming an infinite loop. what must you include in your code to prevent crashes? in roblox
Answers: 2
You wrote a program to find the factorial of a number. In mathematics, the factorial operation is us...
History, 11.09.2020 07:01
Mathematics, 11.09.2020 07:01
Mathematics, 11.09.2020 07:01
Mathematics, 11.09.2020 07:01
Mathematics, 11.09.2020 07:01
Mathematics, 11.09.2020 07:01
Mathematics, 11.09.2020 07:01
Mathematics, 11.09.2020 07:01
Mathematics, 11.09.2020 07:01
Mathematics, 11.09.2020 07:01
Mathematics, 11.09.2020 07:01
Mathematics, 11.09.2020 07:01
Mathematics, 11.09.2020 07:01
Social Studies, 11.09.2020 07:01
History, 11.09.2020 07:01
Mathematics, 11.09.2020 07:01
Mathematics, 11.09.2020 07:01
Mathematics, 11.09.2020 07:01
Physics, 11.09.2020 07:01
Social Studies, 11.09.2020 07:01