Guest User

Untitled

a guest
Mar 24th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. Traceback (most recent call last):
  2. File "C:/Users/Αλέξανδρος/Desktop/1.py", line 12, in <module>
  3. k=k+C[s]
  4. IndexError: list index out of range
  5.  
  6. a=0
  7. b=0
  8. s=0
  9. k=0
  10. A = [0 for a in range(1000)]
  11. B = [0 for b in range(1000)]
  12. C = [0 for s in range(1000000)]
  13. while a<=1000:
  14. C[s]=(A[a]**2+B[b]**2)**0.5
  15. a=a+1
  16. s=s+1
  17. k=k+C[s]
  18. if a==1000:
  19. b=b+1
  20. a=0
  21. if a==1000 and b==1000:
  22. print (k/1000000)
Add Comment
Please, Sign In to add comment