Python Projects: Compute the value of Pi to n number of decimal places
Python Project-1 with Solution
Create a Python project to get the value of Pi to n number of decimal places.
Note: Input a number and the program will generate PI to the nth digit
Sample Solution -1 :
Python Code:
Sample Output:
Enter the number of decimals to calculate to: 5 3.14159
Flowchart:

Sample Solution -2 :
Python Code:
Sample Output:
Enter the number of digits you want after the decimal for Pi: 5 3.14159
Flowchart:

Sample Solution -3 :
Python Code:
Sample Output:
Please type number between 0-1000: 8 3.14159266
Flowchart:

Sample Solution -4 :
Python Code:
Sample Output:
PI >>>>>>>>>> 3.141592653589793235602541812141379285866306715610149218684551786650252153469632637309117852151159714537117427945211584672226312439842050377685609241701572487956515336256451884653308025999156699529458184376955252001085693453737649800187605123943826169924919030970189770760788301321900624395693702676234864995384812854310220642057305637554086524948960077795499941378034295271204385281577283147587536626
Flowchart:

Sample Solution -5 :
Python Code:
Sample Output:
How many spaces? 5 3.14159
Flowchart:

Improve this sample solutions and post your code through Disqus