Professional Documents
Culture Documents
Compute PI Value PROJECT
Compute PI Value PROJECT
Compute PI Value PROJECT
SCHOOL
MADAR AJMER
PROJECT REPORT
ON COMPUTING PI
VALUE
ROLL NO : 2800247
EXTERNAL SIGNATURE
CERTIFICATE
2
TABLE OF CONTENTS
01 ACKNOWLEDGEMENT 04
02 INTRODUCTION 05
04 PROPOSED SYSTEM 06
06 FLOW CHART 08
07 SOURCE CODE 09
08 OUTPUT 10
10 BIBLIOGRAPHY 13
3
ACKNOWLEDGEMENT
Apart from the efforts of me, the success of any project depends largely on
the encouragement and guidelines of many others. I take this opportunity to express
my gratitude to the people who have been instrumental in the successful completion
of this project.
I express deep sense of gratitude to almighty God for giving me strength for
the successful completion of the project.
The guidance and support received from all the members who contributed
and who are contributing to this project, was vital for the success of the project. I am
grateful for their constant support and help.
4
PROJECT ON COMPUTING PI VALUE
INTRODUCTION
the ratio of a circle's circumference to its diameter, it now has various equivalent
definitions and appears in many formulas in all areas of mathematics and physics. It
is approximately equal to 3.14159. It has been represented by the Greek letter "π"
since the mid-18th century, though it is also sometimes spelled out as "pi". It is also
called Archimedes' constant. This project computes the pi value depending on user
input.
The objective of this project is to let the students apply the programming
knowledge into a real- world situation/problem and exposed the students how
5
PROPOSED SYSTEM
Today one cannot afford to rely on the fallible human beings of be really
wants to stand against today’s merciless competition where not to wise saying “to
err is human” no longer valid, it’s outdated to rationalize your mistake. So, to keep
pace with time, to bring about the best result without malfunctioning and greater
efficiency so to replace the unending heaps of flies with a much sophisticated hard
One has to use the data management software. Software has been an ascent
markets, which have helped in making the organizations work easier and efficiently.
Data management initially had to maintain a lot of ledgers and a lot of paper work
has to be done but now software product on this organization has made their work
faster and easier. Now only this software has to be loaded on the computer and work
can be done.
This prevents a lot of time and money. The work becomes fully automated
and any information regarding the organization can be obtained by clicking the
6
SYSTEM DEVELOPMENT LIFE CYCLE (SDLC)
7
FLOW CHART
8
SOURCE CODE
"""
q, r, t, k, n, l = 1, 0, 1, 1, 3, 3
decimal = limit
counter = 0
if 4 * q + r - t < n * t:
# yield digit
yield n
# insert period after first digit
if counter == 0:
yield '.'
# end
if decimal == counter:
print('')
break
counter += 1
nr = 10 * (r - n * t)
n = ((10 * (3 * q + r)) // t) - 10 * n
9
q *= 10
r = nr
else:
nr = (2 * q + r) * l
nn = (q * (7 * k) + 2 + (r * l)) // (t * l)
q *= k
t *= l
l += 2
k += 1
n = nn
r = nr
pi_digits = calcPi(int(input(
i = 0
for d in pi_digits:
print(d, end='')
i += 1
10
if i == 40:
print("")
i = 0
main()
OUTPUT
11
HARDWARE AND SOFTWARE REQUIREMENTS
SOFTWARE REQUIREMENTS:
I. Windows OS
II. Python
12
BIBLIOGRAPHY
13