1#x starts at 1 and goes up to 80 @ intervals of 2
2for x in range(1, 80, 2):
3 print(x)
1Python Loops
2
3for x in range(1, 80, 2):
4 print(x)
5
6words=['zero','one','two']
7for operator, word in enumerate(words):
8 print(word, operator)
9
10for x in range(1, 80, 2):
11 print(x)
12
13
14
15
16
1var counter = 0;
2while true {
3 print("Hello")
4 counter += 1;
5 if counter == 10 {
6 break
7 }
8}
1#While Loop:
2while ("condition that if true the loop continues"):
3 #Do whatever you want here
4else: #If the while loop reaches the end do the things inside here
5 #Do whatever you want here
6
7#For Loop:
8for x in range("how many times you want to run"):
9 #Do whatever you want here
1# prints Hello Geek 3 Times
2count = 0
3while (count < 3):
4 count = count+1
5 print("Hello Geek")
6