+ 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
4 Answers
+ 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.
+ 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.
+ 2
From absolute basics everything you need for that task in order are here:
Simple Operations and Integers:
https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2271/
Input & Output:
https://www.sololearn.com/learn/Python/2426/
Type Conversion:
https://www.sololearn.com/learn/Python/2492/
Variables:
https://www.sololearn.com/learn/Python/2428/
In-Place Operators:
https://www.sololearn.com/learn/Python/2429/
Booleans:
https://www.sololearn.com/learn/Python/2276/
While Loops:
https://www.sololearn.com/learn/Python/2281/
0
thank you all