OpenMRS
Finding factorial value of the input value - Python Beginners task
This task will prepare you and your environment for the Python-based Developments.
If you don't have Python in your computer, please follow these instructions to install and configure (We just mentioned the steps, you need to Google it and find the exact ways).
- Download the Python from the official website
- Install and configure with your environment
- You can use any type of IDE or environment for the coding (eg : python default editor, notepad, etc).
Now you should write the following program on simple Python Code, and submit it for the evaluations.
Task : Your Python program should ask to insert a numeric number (n) on the terminal/screen, and then it should print the factorial value of that number in two decimal places.
- Sample Input : 5
- Sample Output : 120.00
- Step : 1 x 2 x 3 x 4 x 5 (consider only integers)
You can't use any direct python libraries to calculate the factorial value of a given number. Using math library is allowed for only rounding purposes.
You are expected to handle the,
- Python I/O basic (get input/print output)
- Use mathematical functions to calculate the decimal places
- Exception handling
- Comments
Submission steps
- You need to submit the screenshot of your running code (it should indicate the python commands, getting input, and the output
- Paste your code into a new Gist and submit for the evaluations
Task tags
Students who completed this task
Neelesh Ranjan, 4VY, ArtemTin, Bru31, DrHypnotic, Bikalpa, Elantal, abacles, Jakub Szczepaniak, Kamil Michna, coder.suyash, gokceduzyol, Torpedo, aidan.harges, Anmol Jhamb, super dukes, iaminapickle, sher222, jwzhang, yoyoyoitsalan, Romalcake, Swizzzyy, brown121407, bkajackson9, st1ngr3y, RohanJnr, Monika, ASI, Alejandro Garcia, Helene, MayowaE, aviralReaper, AD, Suraj, JayanthVK, Angie C, WSChong, Hrishikesh, Sahith, Adam, Alpha, Pillowman, WZCoding, Ayush Jain, Ritish, boziconti, angr_pukhlya, Coding Cook, Grzegorz Babiarz, Pratyush3124, Zain Siddavatam, INEFFABLE, Dude Coder, DominatingDonut, Atonbara, trapshadow, Ankit Kumar, Grow20, AbhayS, Tech45