MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/136dits/solve_the_problem_without_using_a_loop/jise9d5/
r/badcode • u/YonMiru • May 03 '23
129 comments sorted by
View all comments
1
Here's a start;
# Python program to print all even numbers in rangefor even_numbers in range(0,102,2):
print(even_numbers,end=' ')
1 u/[deleted] May 04 '23 Required: no loop. The for loop is a loop, isn't it? 1 u/moldor_the_flatulent May 08 '23 I'm not sure you can do it without some teeny weenie loop somewhere.
Required: no loop. The for loop is a loop, isn't it?
1 u/moldor_the_flatulent May 08 '23 I'm not sure you can do it without some teeny weenie loop somewhere.
I'm not sure you can do it without some teeny weenie loop somewhere.
View all comments
1
u/moldor_the_flatulent May 04 '23
Here's a start;
# Python program to print all even numbers in range
for even_numbers in range(0,102,2):
print(even_numbers,end=' ')