In the exercise of control flow, I’ve got the output but I have different code hahaha
just sharing.
count = 1
for number in range(1, 10):
if number % 2 == 0:
print(number)
count = number // 2
print(f"We have {count} even numbers")
In the exercise of control flow, I’ve got the output but I have different code hahaha
just sharing.
count = 1
for number in range(1, 10):
if number % 2 == 0:
print(number)
count = number // 2
print(f"We have {count} even numbers")