i = 10
n = 100
c = 0
while i < n:
if i % 10 == 4 or i % 10 == 8:
c += 1
i += 2
print(c)
Без цикла как-то проще! i = 10
n = 100
print((n - i) // (10 // 2))
i = 10
n = 100
c = 0
while i < n:
if i % 10 == 4 or i % 10 == 8:
c += 1
print(i, end=' ')
i += 2
print()
print(c)
i, res = 10, 0
while i <= 100:
if i % 2 == 0 and len(str(i)) == 2 and str(i)[-1] in ["4", "8"]:
res += 1
i += 1
print(res)
i = 10
while i <= 100:
if i % 2 == 0 and len(str(i)) == 2 and str(i)[-1] in ["4", "8"]:
print(i)
i += 1
count = 0
num = 10
while num < 100:
if num % 2 == 0 and (num % 10 == 4 or num % 10 == 8):
count += 1
num += 1
print("Количество четных двузначных чисел, оканчивающихся на 4 или 8:", count)