### Factorial

Algorithms
Mathematics
Numbers

Return the factorial of a given input number.

Note that the number must be equal or greater than 1.

i.e.:

``````factorial(6) = 720
factorial(5) = 120
``````
``````def factorial(x):
return 1 if x == 1 else x*factorial(x-1)``````
{"ft_lang_label":"__label__en","ft_lang_prob":0.51308674,"math_prob":0.9998366,"size":358,"snap":"2020-34-2020-40","text_gpt3_token_len":105,"char_repetition_ratio":0.1779661,"word_repetition_ratio":0.0,"special_character_ratio":0.31564245,"punctuation_ratio":0.1971831,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99946886,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-08-15T20:06:29Z\",\"WARC-Record-ID\":\"<urn:uuid:b7eaefab-fa5f-42da-bf8c-e633a3a76206>\",\"Content-Length\":\"30754\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:73f49ae5-349f-48e4-bd4a-543ecb196d42>\",\"WARC-Concurrent-To\":\"<urn:uuid:690fa9f5-fd87-4f28-b13c-ab4c43c73acc>\",\"WARC-IP-Address\":\"104.26.12.79\",\"WARC-Target-URI\":\"https://www.codewars.com/users/Raphango/published_kumite\",\"WARC-Payload-Digest\":\"sha1:NEZJW3Z76OOVCW2J23BDPHVZCGK2SLAN\",\"WARC-Block-Digest\":\"sha1:LYDQHJUTHVM3ZV45VG5RCAN5PCQBS2JC\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-34/CC-MAIN-2020-34_segments_1596439741154.98_warc_CC-MAIN-20200815184756-20200815214756-00127.warc.gz\"}"}