Print all even numbers between 50 and 70 in descending order. in loop python for beginners.
Answers
Answered by
1
Answer:
The program goes like:
________________________
for i in range(69,49,-1):
if i%2==0:
print(i)
else:
pass
_________________________
Explanation:
It's for number between 50 and 70 excluding 70. If you want to include 70, replace 69 with 70 in range(69,49,-1).
Answered by
3
even_nums = []
for x in range(70, 49, -1):
if x % 2 == 0:
even_nums.append(str(x))
print("\n".join(even_nums))
Similar questions