Anyone That Know Python Programming Should Help Me To Check The Eorr This - Programming - Nairaland
Nairaland Forum › Science/Technology › Programming › Anyone That Know Python Programming Should Help Me To Check The Eorr This (2683 Views)
| Anyone That Know Python Programming Should Help Me To Check The Eorr This by omoolabeads(op): 10:53pm On Apr 02, 2016 |
Create both a recursive function called recursive_factorial and iterative function called iterative_factorial that does the following Accepts as parameter an Integer n Computes the factorial of n Returns the factorial of n SOLUTION import unittest class RecursiveTestCase(unittest.TestCase): def test_recursive_factorial_one(self): result = recursive_factorial(4) self.assertEqual(result, 24, msg="Inaccurate value" ![]() def test_recursive_factorial_two(self): result = recursive_factorial(0) self.assertEqual(result, 1, msg="Inaccurate value" ![]() def test_iterative_factorial_one(self): result = iterative_factorial(5) self.assertEqual(result, 120, msg="Inaccurate value" ![]() def test_iterative_factorial_two(self): result = iterative_factorial(12) self.assertEqual(result, 479001600, msg="Inaccurate value" ![]() |
| Re: Anyone That Know Python Programming Should Help Me To Check The Eorr This by khaynoni(m): 10:59pm On Apr 02, 2016 |
Let's see your code. I guess this is one of Andela's ALGO lab question. |
| Re: Anyone That Know Python Programming Should Help Me To Check The Eorr This by tr3y(m): 11:49pm On Apr 02, 2016*. Modified: 11:12am On Apr 03, 2016 |
Bro if you seriously expect someone to come and drop his code for you to copy then you should quit programming and face beads. |
| Re: Anyone That Know Python Programming Should Help Me To Check The Eorr This by FrankLampard: 8:16am On Apr 03, 2016 |
tr3y:Bro calm down na, u don't have the right to insult OP like that, if you can't help him ball out na, nobody is telling you to write full code so he can copy. Nawa oh. |
| Re: Anyone That Know Python Programming Should Help Me To Check The Eorr This by FrankLampard: 8:18am On Apr 03, 2016 |
OP I don't know Python at all. If it was Java or PHP, I would have helped. |
| Re: Anyone That Know Python Programming Should Help Me To Check The Eorr This by tr3y(m): 11:05am On Apr 03, 2016 |
FrankLampard:I'm not insulting OP in anyway, if you want people to help you, you have to show at least some effort by pasting the codes you have tried. He open a thread with just the Andela test code without showing us at least some part of codes he wrote himself. If he had posted his own trial code, I will know how to point him to the right resources, to come here empty handed and expect to go with a bag full of codes for your assignment is just not right. |
| Re: Anyone That Know Python Programming Should Help Me To Check The Eorr This by Nobody: 11:07am On Apr 03, 2016 |
Where is your recursive factorial function ![]() All i can see here is a unit test of the actual program..... |
| Re: Anyone That Know Python Programming Should Help Me To Check The Eorr This by dabanzy(m): 8:37pm On Apr 03, 2016 |
def recursive_factorial (n): op that should solve your problem |
| Re: Anyone That Know Python Programming Should Help Me To Check The Eorr This by omoolabeads(op): 7:29am On Apr 04, 2016 |
Thanks to everybody........... Am a Java Programming and i help people with beads making. This question (Python)was giving to a friend and am trying to help him. Thanks God bless you all @dabanzy much love |
| Re: Anyone That Know Python Programming Should Help Me To Check The Eorr This by dabanzy(m): 10:01pm On Apr 06, 2016 |
@omoolabeads u're welcome |
| Re: Anyone That Know Python Programming Should Help Me To Check The Eorr This by antiomic: 12:21am On Jul 20, 2016 |
def recursive_factorial(n): n = int(n) if n <= 1: return 1 else: return (n * recursive_factorial(n - 1)) # print (recursive_factorial()) def iterative_factorial(n): result = 1 for i in range(1, n+1): result *= i return result # print (iterative_factorial()) |
How Does It Take To Learn Python programming language Easy And Faster? • Learn And Practice Python Programming • Data Science Tutorial For Beginners With Python Programming Language • 2 • 3 • 4
Number Generator Challenge : Can You Solve This? • How To Download UC Browser For Android Phone|www.wap.ucweb.com • Impact Of Marijuana On Programmers

