Перевести с pascal на python. 80 . var a: array[1..70]of integer; i,kol: integer; begin randomize; for i: =1 to 70 do a[i]: =random(50)-40; for i: =1 to 70 do write(a[i],' '); writeln; for i: =1 to 70 do if a[i]> 0 then break else inc(kol); writeln(kol); readln; end.
import numpy as np
import random as rand
a = np.zeros(70, dtype=np.int32)
kol = int()
for i in range(70):
a[i] = rand.randint(-40, 50)
for i in range(70):
print(a[i], end="\n")
for i in range(70):
if a[i] > 0:
break
else:
kol+=1
print(kol)