class new_(): def __init__(self): self.std_=20000 def new1 (self): if (0<i<=600000): s=10 elif (800001<i<=1300000): s=20 i=1000000 for i in range (0,i,100000): data=new() data.new1() s+=s #not able to call the variable inside the if/elif function print(s)#how to call the variable inside the class or function
#I want to add "s" each and every 100000 interval
buran write Feb-08-2025, 04:55 PM:
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.