Explain recursion with an example.
Answer / 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 |
How Many versions are there in crystal reports
Write a program to find duplicate number from array in minimum time complexity.
THE CHANNEL IN DATA COMMUNICATION CAN BE?
What is the use of Differ interface check box in Ship confirm?
Can i please VHDL code for D-Latch with clear input ?? (HINT: Set up a “Process” with appropriate sensitivity list to get the desired D-Latch with Clr working.) Inputs and Outputs: entity Lab4b is Port ( Clr, Clk, D : in STD_LOGIC; Q : out STD_LOGIC); end Lab4b;
why rownum=1 works properly but not rownum=>2,=>3 etc.
hai i am mca 2009 fresher.please tell me which certification helps me to get an IT job faster which institute is good in hyderabad.please mail me to prasanna.1856@rediff.com
Need guidewire related Documents(Interview Question/Tips/Best Practice/Dumps)
Please forward important interview and basic questions in VB6 on my email id: usneha_16@yahoo.co.in
what is the BAM? where we can use it in BizTalk server?
WS-NUM PIC S9(05)V(02) SIGN TRAILING SEPARATE MOVE '0050000+' TO WS-NUM The value stored is 00500,00+ MOVE '0050000-' TO WS-NUM Then what is the value will be stored in WS-NUM? Am getting '-00500,00'.....>>> What should I declare to WS-NUM so that I can get correct values for both + & - signs.
can php support multiple inheritence?