Cs Hy Ms
Cs Hy Ms
Page 1 of 3
d) 2 MARKS FOR TWO CORRECT POINT OF DISTINCTION 2
5 a) n=10 2
answer=1
while (n<100):
answer= answer + n**2
n=n+1
print(answer)
c) for i in range(4): 3
for j in range(4,i,-1):
print( j, end= ’ ‘ )
else :
print( )
OR ANY OTHER METHOD
d) #Program to print the numbers between 0-100 which are divisible by 7 and 9 4
both and counting them.
count=0
for i in range(0,101)
if i % 7 == 0 and i % 9 == 0:
count=count+1
print(i)
print( count)
OR ANY OTHER METHOD
Page 2 of 3
b) VARIABLE a WILL STORE () 3
VARIABLE b WILL STORE (80,88,83,86)
VARIABLE c WILL STORE (88,85)
VARIABLE d WILL STORE (80,85,80,88)
VARIABLE e WILL STORE (83,86)
VARIABLE f WILL STORE (80,88)
c) i. 20 2
ii. [1, 2, 30]
Page 3 of 3