Rewrite following program using for loop
i = 4
while i < 9:
print(i)
i = i+2
(Python )
Answers
Answered by
2
Answer:
Explanation:
for i in range(4,9,2):
print(i)
Answered by
1
Question:-
➡ Rewrite the following program using for loop.
Solution:-
Given code,
i=4
while i<9:
print(i)
i=i+2
Using for loop, we can write like this,
for i in range(4,9,2):
print(i)
Similar questions