Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Traceback (most recent call last):
- File "C:/Users/Αλέξανδρος/Desktop/1.py", line 12, in <module>
- k=k+C[s]
- IndexError: list index out of range
- a=0
- b=0
- s=0
- k=0
- A = [0 for a in range(1000)]
- B = [0 for b in range(1000)]
- C = [0 for s in range(1000000)]
- while a<=1000:
- C[s]=(A[a]**2+B[b]**2)**0.5
- a=a+1
- s=s+1
- k=k+C[s]
- if a==1000:
- b=b+1
- a=0
- if a==1000 and b==1000:
- print (k/1000000)
Add Comment
Please, Sign In to add comment