+ 3

What does 7! or 3! mean?

16th May 2019, 1:17 PM
ERROR_404
ERROR_404 - avatar
10 Réponses
16th May 2019, 1:56 PM
Rstar
Rstar - avatar
+ 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.
16th May 2019, 2:57 PM
Kainatic [Mostly Inactive Now]
Kainatic [Mostly Inactive Now] - avatar
+ 7
Factorial 7!=7*6*5*4*3*2*1
16th May 2019, 1:19 PM
Thoq!
Thoq! - avatar
+ 5
Yes
16th May 2019, 1:34 PM
Thoq!
Thoq! - avatar
+ 5
Oops! Sry. Lol. That is only the mathematical syntax not the python one.
16th May 2019, 2:07 PM
Thoq!
Thoq! - avatar
+ 1
Kainatic I will try 😊 Rstar figures
16th May 2019, 3:49 PM
ERROR_404
ERROR_404 - avatar
+ 1
Thoq! Kainatic Rstar Thanks brothas
16th May 2019, 3:50 PM
ERROR_404
ERROR_404 - avatar
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)
16th May 2019, 1:23 PM
ERROR_404
ERROR_404 - avatar
0
But I'm getting an error!
16th May 2019, 1:40 PM
ERROR_404
ERROR_404 - avatar
0
Thoq! bruh
16th May 2019, 3:48 PM
ERROR_404
ERROR_404 - avatar