Hello everyone, it is boozle again! I have finally gotton into coding and am completely addicted!. Is that a good thing? Anyways, I spent 7 hours writing this python program which calculates pi... It is still a work in progress, and I have no prior experience with coding, so don't judge. >.> Code: def add(val): val += 2 #def add(val): #val = val + 2 return val #x += 2 # Not sure if this will work when called from another command line. def somecommandline(): # Defines the actual main part of the program # says how much "x starts off as" x = 1.0 # says how to start the process uf = 4 / x print 'Success! Just wait...' for i in range(0,1000000): x=add(x) unfin = uf - 4 / x x=add(x) fin = unfin + 4 / x #print '===' #print fin #print int(fin) uf = fin print '========================' print fin somecommandline()
Me three. I'm the only guy in my class who messes with JavaScript during computer. Probably cuz I'm the only guy in my class who knows how