Answer Posted / nashiinformaticssolutions
o Recursion is a technique where a function calls itself to solve smaller sub-problems.
8. def factorial(n):
9. if n == 1:
10. return 1
11. else:
12. return n * factorial(n - 1)
13. print(factorial(5)) # Output: 120
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
what is the difference between an OS(operating system) and Framework?
WHAT IS MAIN IMPORTANT THING IN SOFTWARE?
I want to pass .pdf files as OlE Object to crystal report through VB6. Please any one guid me...
what are stubs related to foxpro?
Write a function which accepts a sentence as input parameter.Each word in that sentence is to be reversed. Space should be there between each words.Return the sentence with reversed words to main function and produce the required output. for eg:- i/p: jack jill jung kill o/p: kcaj llij gnuj llik
Write a pascal program to calculate the sum of the first 100 even number and odd number
design a counter with the following repeated binary sequence: 0, 1, 2, 3, 4, 5, 6, 7, 8 using JK Flip Flop.
How to call dll API sub routine in VB Form.
define profiler???
Hey this is venkatesh.Please can any body tell me what is SFLNXTCHG?where we use this keyword?what perpuse we use this?Can you tell me in real time senario with example? And in 7 specification(RPG/400)what is the mandatory specification using programs?
how to check single or double byte in struts
19. Given a system that is described with the following equation, X=A+(B.(A̅+C)+C)+A.B.(D̅+E̅) a) Simplify the equation using Boolean Algebra. b) Implement the original and then the simplified equation with a digital circuit. c) Implement the original and then the simplified equation in ladder logic.
For a binary tree with n nodes, How many nodes are there which has got both a parent and a child?
How to create a new dataset only duplicate observations in proc sort procedure?
How does the TCP handle the issue of multiplexing?