Home C C++ Java Python Perl PHP SQL JavaScript Linux Selenium QT Online Test

Home » Forum » x-Forum » Question

Enter sequence of numbers and find the amount and sum of n

Where is the mistake?
sek = [3, 5, 10, 67, 30, 20, 0, 1, 3, 0]
kiek = 0
suma = 0
i = 0
while i < len(sek):
    i += 1
    if i % 10 == 0:
        kiek += 1
        suma += i
print(kiek, suma)

Posted by austejaha 2020-10-06 00:09:34

No Ans Posted

Please login to comment

Log In


Ask New Question