Floor 4 - Computer Room
Santa Rosa de Lima English Secondary School
聖羅撒英文中學
Colégio de Santa Rosa de Lima - Secção Inglesa
1.
Explore the concept of Accumulator in Looping
2.
Focusing on the value change of variables in looping
3.
Define while loop statement for requirements
1.
3.
while i <= 3 :
4.
Tab
5.
Tab
i = 1
acc = acc + i
i = i + 1
2.
acc = 0
i
_____
acc
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
1.
3.
while i <= 3 :
4.
Tab
5.
Tab
i = 1
acc = acc + i
i = i + 1
2.
acc = 0
i
_____
acc
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
1.
3.
while i <= 3 :
4.
Tab
5.
Tab
i = 1
acc = acc + i
i = i + 1
2.
acc = 0
i
_____
acc
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
1
1.
3.
while i <= 3 :
4.
Tab
5.
Tab
i = 1
acc = acc + i
i = i + 1
2.
acc = 0
i
_____
acc
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
1
1.
3.
while i <= 3 :
4.
Tab
5.
Tab
i = 1
acc = acc + i
i = i + 1
2.
acc = 0
i
_____
acc
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
1
0
1.
3.
while i <= 3 :
4.
Tab
5.
Tab
i = 1
acc = acc + i
i = i + 1
2.
acc = 0
i
_____
acc
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
1
0
1.
3.
while i <= 3 :
4.
Tab
5.
Tab
i = 1
acc = acc + i
i = i + 1
2.
acc = 0
i
_____
acc
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
1
0
1.
3.
while i <= 3 :
4.
Tab
5.
Tab
i = 1
acc = acc + i
i = i + 1
2.
acc = 0
i
_____
acc
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
1
0
1
1.
3.
while i <= 3 :
4.
Tab
5.
Tab
i = 1
acc = acc + i
i = i + 1
2.
acc = 0
i
_____
acc
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
1
0
1
1.
3.
while i <= 3 :
4.
Tab
5.
Tab
i = 1
acc = acc + i
i = i + 1
2.
acc = 0
i
_____
acc
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
1
0
1
2
1.
3.
while i <= 3 :
4.
Tab
5.
Tab
i = 1
acc = acc + i
i = i + 1
2.
acc = 0
i
_____
acc
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
1
0
1
2
1.
3.
while i <= 3 :
4.
Tab
5.
Tab
i = 1
acc = acc + i
i = i + 1
2.
acc = 0
i
_____
acc
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
1
0
1
2
1.
3.
while i <= 3 :
4.
Tab
5.
Tab
i = 1
acc = acc + i
i = i + 1
2.
acc = 0
i
_____
acc
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
1
0
1
2
3
1.
3.
while i <= 3 :
4.
Tab
5.
Tab
i = 1
acc = acc + i
i = i + 1
2.
acc = 0
i
_____
acc
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
1
0
1
2
3
1.
3.
while i <= 3 :
4.
Tab
5.
Tab
i = 1
acc = acc + i
i = i + 1
2.
acc = 0
i
_____
acc
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
1
0
1
2
3
3
1.
3.
while i <= 3 :
4.
Tab
5.
Tab
i = 1
acc = acc + i
i = i + 1
2.
acc = 0
i
_____
acc
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
1
0
1
2
3
3
1.
3.
while i <= 3 :
4.
Tab
5.
Tab
i = 1
acc = acc + i
i = i + 1
2.
acc = 0
i
_____
acc
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
1
0
1
2
3
3
1.
3.
while i <= 3 :
4.
Tab
5.
Tab
i = 1
acc = acc + i
i = i + 1
2.
acc = 0
i
_____
acc
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
1
0
1
2
3
3
6
1.
3.
while i <= 3 :
4.
Tab
5.
Tab
i = 1
acc = acc + i
i = i + 1
2.
acc = 0
i
_____
acc
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
1
0
1
2
3
3
6
1.
3.
while i <= 3 :
4.
Tab
5.
Tab
i = 1
acc = acc + i
i = i + 1
2.
acc = 0
i
_____
acc
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
1
0
1
2
3
3
6
4
1.
3.
while i <= 3 :
4.
Tab
5.
Tab
i = 1
acc = acc + i
i = i + 1
2.
acc = 0
i
_____
acc
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
1
0
1
2
3
3
6
4
1.
3.
while i <= 3 :
4.
Tab
5.
Tab
i = 1
acc = acc + i
i = i + 1
2.
acc = 0
i
_____
acc
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
_____
1
0
1
2
3
3
6
4
End
1
2
3
1
2
3
Day
_____
Acc
_____
_____
_____
_____
_____
_____
_____
1
1
3
2
7
3
15
4
Apples
_____
_____
_____
_____
1
2
4
8
_____
_____
?
30
_____
?
.
.
.
1
2
3
Day
_____
Acc
_____
_____
_____
_____
_____
_____
_____
1
1
3
2
7
3
15
4
Apples
_____
_____
_____
_____
1
2
4
8
_____
_____
?
30
_____
?
.
.
.
1
2
3
Year
_____
_____
_____
_____
1
2
3
4
Interest
_____
_____
_____
_____
500
525
551.25
578.81
_____
30
_____
?
.
.
.
Total
_____
_____
_____
_____
10500
11025
11576.25
12155.06
_____
?
1
2
3
Year
_____
_____
_____
_____
1
2
3
4
Interest
_____
_____
_____
_____
500
525
551.25
578.81
_____
30
_____
?
.
.
.
Total
_____
_____
_____
_____
10500
11025
11576.25
12155.06
_____
?
1
2
4
Day
_____
_____
_____
_____
1
2
3
4
Saving
_____
_____
_____
_____
1
3
5
7
_____
60
_____
119
.
.
.
Total
_____
_____
_____
_____
1
4
9
16
_____
3600
3
1
2
4
Day
_____
_____
_____
_____
1
2
3
4
Saving
_____
_____
_____
_____
1
3
5
7
_____
60
_____
119
.
.
.
Total
_____
_____
_____
_____
1
4
9
16
_____
3600
3