python loops
#x starts at 1 and goes up to 80 @ intervals of 2
for x in range(1, 80, 2):
print(x)
python loops
#x starts at 1 and goes up to 80 @ intervals of 2
for x in range(1, 80, 2):
print(x)
loops in python
#While Loop:
while ("condition that if true the loop continues"):
#Do whatever you want here
else: #If the while loop reaches the end do the things inside here
#Do whatever you want here
#For Loop:
for x in range("how many times you want to run"):
#Do whatever you want here
python for loop
nums = ['one', 'two', 'three']
for elem in nums:
print(elem)
python for loop
for x in range(10):
print(x)
// output: 1,2,3,...,10
for x in range(10, 20, 2):
print(x)
// output: 10, 12, 14, 16, 18, 20
list = [2, 3, "el"]
for x in list:
print(x)
// output: 2, 3, "el"
for _ in range(10):
print("a");
// Do the loop without using index
python loop
# Python program to illustrate
# while loop
count = 0
while (count < 3):
count = count + 1
print("Hello Geek")
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us