Skip to content
← Back to Community
Calculating Pi number
Profile icon
EnrikeChurin

This repl calculates Pi number by Leibniz's formula. times variable equals length of the formula.

Voters
Profile icon
GGIEnrike
Profile icon
Invisible3000
Profile icon
SelenaYang1
Profile icon
EnrikeChurin
Comments
hotnewtop
Profile icon
SlateTheDev

doesnt work

Profile icon
EnrikeChurin

@SlateTheDev Sorry for not being clear enough with my code. You have to type in an integer value of how much you want the loop to repeat. Basically the more repeats, the more precise the Pi will be.

Profile icon
EnrikeChurin

@EnrikeChurin Btw, if something doesn't work, take a look at the code. If you would have looked inside, you would've seen an input(). I've updated the code so that it now writes in the console for you to input a value.