import random as r N = r.randit(0,100) c = 0 while N >= 0: c = c + N N -= 1 print(c)