+ 3
What does 7! or 3! mean?
10 odpowiedzi
+ 9
ERROR_404 There is nothing like print(7!) should give you 7×6×5×4×3×2×1 in python.
In order to get factorial you need to write the necessary function
https://www.sololearn.com/discuss/117761/?ref=app
https://www.sololearn.com/discuss/145014/?ref=app
https://www.sololearn.com/discuss/1622429/?ref=app
https://www.sololearn.com/discuss/639516/?ref=app
https://www.sololearn.com/discuss/799751/?ref=app
+ 8
ERROR_404 In maths, the exclamation mark after a natural number indicates a factorial of that number.
So, 'n!' is read as 'n factorial' or 'factorial of n', where n is any natural number.
n! = n × (n-1) × (n-2) × ... × 3 × 2 × 1
7! = 7 × 6 × 5 × 4 × 3 × 2 × 1 = 5040
If you want to write a code for it, follow the many links Rstar has mentioned or search it on the internet. But first, do give it a try yourself. Just use the concept and try to code it in. It will help a lot in the learning process.
Edit: Please add the tags 'python3' and 'python' in the question.
Edit 2: "print(7!)" isn't a valid command. The factorial isn't a built-in "feature", you need to write the code yourself.
+ 7
Factorial
7!=7*6*5*4*3*2*1
+ 5
Yes
+ 5
Oops! Sry. Lol. That is only the mathematical syntax not the python one.
0
So for a command, "print(7!)" I should get the output as the value of 7×6×5×4×3×2×1 correct? (python3)
0
But I'm getting an error!
0
Thoq! bruh