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)
python for loop
# Python for Loops
# There are 2 types of for loops, list and range.
# List:
food = ['chicken', 'banana', 'pie']
for meal in food: # Structure: for <temporary variable name> in <list name>:
print(meal)
# Will use the temporary variable 'meal' every time it finds an item in the list, and print it
# So output is: chickennbanananpien
# Range:
for number in range(9): # Will loop 9 times and temporaray variable number will start at 0 and end at 8
print(number) # Prints variable 'number'
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