Page 114 - TechPluse_C7_Flipbook
P. 114
Mind Boggler
A. Application based questions.
Experiential Learning
1. Sheena’s teacher asked her to write a BASIC-256 program to generate
odd series 1, 3, 5, 7, 11, ..., 21. Help Sheena to accomplish the given task.
2. Neetu’s teacher asked her to generate even series 2, 4, 6, ..., 30. Help Neetu to identify which
looping technique needs to be used to accomplish the given task.
B. What will be the output of the following programs?
Computational Thinking
1. FOR N = 1 TO 10
IF (N = 1 ) THEN
PRINT "I had " + N + " slice of pizza."
ELSE
PRINT "I had " + N + " slices of pizza."
END IF
NEXT N
2. FOR N = 1 TO 10
PRINT "I had " + N + " slices of pizza."
NEXT N
3. sum = 0
FOR N = 1 TO 40 STEP 4
sum = sum + N
NEXT N
PRINT "sum = " + sum
4. a = 0
b = 1
for i = 1 to 10
print a
temp = a + b
a = b
b = temp
next i
5. for i = 1 to 10
print i
next i
6. input "Enter your age: ", age
if age >= 18 then
print "You are an adult."
112 Premium Edition-VII

