-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwhile-loop.py
More file actions
78 lines (49 loc) · 959 Bytes
/
while-loop.py
File metadata and controls
78 lines (49 loc) · 959 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# while Loops
# items = int(input()) # 3
# days = int(input()) # 2
# for i in range(days):
# items *= 2
# print(items)
# i = 3
# while i>=0:
# print(i)
# i = i - 1
# i = 5
# while True:
# print(i)
# i = i - 1
# if i <= 2:
# break
# For loop
# list = [2, 3, 4, 5, 6, 7]
# for x in list:
# if(x%2==1 and x>4):
# print(x)
# break
# list = [1, 2, 3, 4, 5, 6, 7, 8, 9]
# sum = 0
# for i in list:
# sum = sum +i
# print(sum)
# nums = list(range(5))
# print(nums[4])
# nums = list(range(5, 8))
# print(len(nums))
# nums = list(range(3, 15, 3))
# print(nums[2])
# a = int(input())
# b = int(input())
# years = []
# for year in range(a, b):
# years.append(year)
# print(years)
# list = [1, 1, 2, 3, 5, 8, 13]
# print(list[list[4]])
# for i in range(10):
# if not i % 2 == 0:
# print(i+1)
while False:
print("Looping...")
letters = ['x', 'y', 'z']
letters.insert(1, 'w')
print(letters[2])