Series12. A set of nonzero integers is given; The sign of its completion is the number 0. Output the number of numbers in the set.

Solution in Python 3:

import random

x = random.randrange(1,10)
print(x,end='; ')
k = 0
while x != 0:
x = random.randrange(-5,6)
print(x,end='; ')
k += 1

print()
print("Amount:",k)