-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.py
62 lines (51 loc) · 850 Bytes
/
test.py
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
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Oct 16 21:43:54 2017
@author: root
"""
'''
num = 0
while num <= 5:
print(num)
num += 1
print("Outside of loop")
print(num)
numberOfLoops = 0
numberOfApples = 2
while numberOfLoops < 10:
numberOfApples *= 2
numberOfApples += numberOfLoops
numberOfLoops -= 1
print("Number of apples: " + str(numberOfApples))
num = 10
while num > 3:
num -= 1
print(num)
num = 10
while True:
if num < 7:
print('Breaking out of loop')
break
print(num)
num -= 1
print('Outside of loop')
num = 100
while not False:
if num < 0:
break
print('num is: ' + str(num))
num =0
i=0
while i < 5:
num +=2
print(num)
i +=1
print("Goodbye")'''
i = 0
end = 6
add = 0
while i <= end:
add =add +i
i+=1
print (add)