# Factorial number in python with algorithm

## Q) : Implement python script to print factorial of number .

Aim: To print factorial number

Algorithm:

step 1; Start
step 2; Declare the variable n and read n value
step 3: Initialise fact = 1 and i = 1
step 4: In while loop perform
fact = fact * i
i = i + 1
step 5: print factorial of n
step 6: end

Source Code:

```n = int(input('enter the number :'))
fact1 = 1```
` `
`i = 1`
```while n >= i:
fact2 = fact1 * i
i = i + 1```
`    print(f"factorial number of n is {fact2}")`
` `
`Input:`
`enter the number: 50`
` `
`Outout:`
` `
```enter the number :50
factorial number of n is 1
factorial number of n is 2
factorial number of n is 3
factorial number of n is 4
factorial number of n is 5
factorial number of n is 6
factorial number of n is 7
factorial number of n is 8
factorial number of n is 9
factorial number of n is 10
factorial number of n is 11
factorial number of n is 12
factorial number of n is 13
factorial number of n is 14
factorial number of n is 15
factorial number of n is 16
factorial number of n is 17
factorial number of n is 18
factorial number of n is 19
factorial number of n is 20
factorial number of n is 21
factorial number of n is 22
factorial number of n is 23
factorial number of n is 24
factorial number of n is 25
factorial number of n is 26
factorial number of n is 27
factorial number of n is 28
factorial number of n is 29
factorial number of n is 30
factorial number of n is 31
factorial number of n is 32
factorial number of n is 33
factorial number of n is 34
factorial number of n is 35
factorial number of n is 36
factorial number of n is 37
factorial number of n is 38
factorial number of n is 39
factorial number of n is 40
factorial number of n is 41
factorial number of n is 42
factorial number of n is 43
factorial number of n is 44
factorial number of n is 45
factorial number of n is 46
factorial number of n is 47
factorial number of n is 48
factorial number of n is 49
factorial number of n is 50

Process finished with exit code 0
```
{"ft_lang_label":"__label__en","ft_lang_prob":0.7806709,"math_prob":0.99998796,"size":3406,"snap":"2019-51-2020-05","text_gpt3_token_len":934,"char_repetition_ratio":0.3968254,"word_repetition_ratio":0.0945946,"special_character_ratio":0.27216676,"punctuation_ratio":0.048742138,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":1.000001,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-01-27T02:56:20Z\",\"WARC-Record-ID\":\"<urn:uuid:7c04ae71-37d5-4348-8e3e-43f4521b6cf5>\",\"Content-Length\":\"77740\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:9e3eb8af-02ce-4fcf-a40c-28a509f9e31e>\",\"WARC-Concurrent-To\":\"<urn:uuid:0a2b0a58-ee50-4204-a511-ac47071cfe83>\",\"WARC-IP-Address\":\"43.255.154.66\",\"WARC-Target-URI\":\"https://www.myprogrammingschool.com/2019/10/factorial-number-in-python-with-algorithm/\",\"WARC-Payload-Digest\":\"sha1:HTJXYIK72LB4QMHOVGKFW45FFC76YZSR\",\"WARC-Block-Digest\":\"sha1:C5CB2BUCWC4QLTZKWLPV4QLJ2TRNUTTM\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-05/CC-MAIN-2020-05_segments_1579251694176.67_warc_CC-MAIN-20200127020458-20200127050458-00091.warc.gz\"}"}