+ 1

Hi,can anyone help me with this python problem!

using a single integer as input , generate the following until a=x [series of number as shown in below examples] if a=1 then output:1 if a=2 then output:1 2*1 if a=3 then output:1 2*1 1*2*3 if a=4 then output:1 2*1 1*2*3 4*3*2*1

8th Dec 2019, 8:21 PM
Akhilesh Mutagi
Akhilesh Mutagi - avatar
4 Respuestas
+ 3
It's not total clear for me what you like to achieve. But i guess that it could be a calculation that is called fatorial. 4! = 4*3*2*1 = 24 3! = 3*2*1 = 6 It can be calculated with a simple while or for loop. Or do you like to get the special output without calculating the product? Do a trial by yourself, if you encounter a problem come back and present what you have done so far.
8th Dec 2019, 8:51 PM
Lothar
Lothar - avatar
+ 2
Hi Akhilesh Mutagi This looks a lot like homework. As such I will only help you if you show us your attempt at this problem. Please attach a link to your code where you have attempted this.
8th Dec 2019, 8:54 PM
Louis
Louis - avatar
8th Dec 2019, 9:46 PM
Seb TheS
Seb TheS - avatar
0
thank you all
10th Dec 2019, 4:22 AM
Akhilesh Mutagi
Akhilesh Mutagi - avatar