Skip to content

Instantly share code, notes, and snippets.

@makwanadeepam
Last active March 27, 2024 18:48
Show Gist options
  • Save makwanadeepam/21d7e7b326748b325b76b2a62cd5717b to your computer and use it in GitHub Desktop.
Save makwanadeepam/21d7e7b326748b325b76b2a62cd5717b to your computer and use it in GitHub Desktop.
# print 1 to 10
# using while loop
x=1
while(x<=10):
print(x)
x+=1
# using for loop
for i in range(1,11):
print(i)
# For loop will be covered in more depth in other sectins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment