St. Britto Hr. Sec. School - Madurai
12th Computer Science Monthly Test - 2 ( Control Structures )-Aug 2020
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
What are the values taken by range ()?
-
Write a note on the parameters used in print () statement.
-
Draw a flow chart that defines the execution of if-else statement.
-
Using if..else..elif statement check smaller of three numbers.
-
Using if..else..elif statement write a suitable program to display largest of 3 numbers.
-
Write the syntax of while loop.
-
What will be the range of values displayed by the following?
-
Write a python program to print all numbers from 10 to 15 using while loop.
-
List the differences between break and continue statements.
-
Write a program in python that illustrate the use of 'in' and 'not in' if statement
-
-
Write a note on simple if statement with an example.
-
# program to calculate the sum of numbers 1 to 100
n = 100
sum = 0
for counter in range(1,n+1):
sum = sum + counter
print("Sum of 1 until %d: %d" % (n,sum))
-
-
-
Write a program in python to display he following output
1
2 2
3 3 3
4 4 4 4 5 5 5 5 5 -
Program to illustrate the use of pass statement
a=int (input(“Enter any number :”))
if (a==0):
pass
else:
print (“non zero value is accepted”)
-
-
Program to illustrate the use of pass statement in for loop
for val in “Computer”:
pass
print (“End of the loop, loop structure will be built in future”) -
Write a program in python to display the following output.
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5 -
Program to illustrate the use of break statement inside for loop
for word in “Jump Statement”:
if word = = “e”:
break
print (word, end= ' ') -
program to illustrate the use nested loop -for within while loop
i=1
while (i<=6):
for j in range (1,i):
print (j,end='\t')
print (end='\n')
i +=1