You are viewing a single comment's thread. Return to all comments →
import math def function(x,b): tem=2**(b-x**2) tem=math.floor(tem)10*(-9) return(tem) num=list(map(float,input().split(" "))) x_=num[0] b_=num[1] k=function(x_,b_) for i in range(100): k1=function(k,30) if(k==k1): k1=k1+k1 break else: k=k1
my code is this it shows error i cannot undestand whats worng in this can anyone help me print(k1)
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #197: Investigating the behaviour of a recursively defined sequence
You are viewing a single comment's thread. Return to all comments →
import math def function(x,b): tem=2**(b-x**2) tem=math.floor(tem)10*(-9) return(tem) num=list(map(float,input().split(" "))) x_=num[0] b_=num[1] k=function(x_,b_) for i in range(100): k1=function(k,30) if(k==k1): k1=k1+k1 break else: k=k1
my code is this it shows error i cannot undestand whats worng in this can anyone help me
print(k1)