18-For_Loop_print_1_to_10_while_loop.py


Sign up Free. Don't forget to check out our challenges, lessons, solve and learn series and more ...


Code Snippet

print("*****Here's a FOR LOOP in action*****")


for num in range(1,11):
    print(num)
print("*****Now for a WHILE LOOP*****")

i = 0
while i < 10:
    i=i+1
    print(i)
        
                    

Try it yourself