Skip to content
Snippets Groups Projects
Commit 98bbccc8 authored by DARWICH ALI's avatar DARWICH ALI
Browse files

m

parent 23e340a8
Branches
No related merge requests found
def factoriel(n):
if n == 0:
return 1
else:
return n*factoriel(n-1)
def r(n):
def factoriel(n):
if n == 0:
return 1
else:
return n*factoriel(n-1)
b = 0.4
b = 0.1
s = 0
for i in range(n+1):
s+=(b**i)/factoriel(i)
return s
#print(r(100))
def conv(k):
m =0
b= 0.4
b= 0.1
while (b**m > 10**(-k)):
m+=1
return m
print(conv(16))
N = conv(16)
print(conv(76))
N = conv(76)
for i in range(N+1) :
print(r(i))
a = int((r(N)**8)* (10**6))/(10**(6))
a = int((r(N)**38)* (10**6))/(10**(6))
print(a)
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment