11 CS Quarterly
11 CS Quarterly
SECTION-A
18X1=18
1 + 10 % 4
A) 3 B) 2 C) 11 D) 1
7. The _______operator is used to find out if division of two numbers yields any
remainder.
9. Choose the correct syntax for printing values in the same line.
10. The equivalent for loop for the following while loop is:
i=1
while i<=20:
i+=2
(A)for i in range (1,20,2): B) for i in range (0,20,2): C) for i in (1,20,2): D)
None of these
A) + B)- C) * D)/
12. sort () does not work for which type of data members of a list?
13. which function is used to convert a sequence data type into a tuple?
Q17 and Q18 are ASSERTION and REASONING based questions. Mark the
correct choice as
B) Both A and R are true and R is not the correct explanation for A
20. Write a python program to find the square and cube of a number. (Get the number
from the user)
23. Write a python program to print the following pattern using any loop. (Hint: Using
string replication techniques)
#
##
###
####
24.What will be the output of the following code?
list1[2][1] =list1[1][3]
print(list1)
SECTION-C 5x3=15
e = (a + b) *c/d
f = ((a + b) *c)/d
g = (a + b) *(c/d)
print (“Value of (a + b) * (c/d) is”, g)
h=a+(b*c)/d;
27. Write a program that reads a string and check whether it is a palindrome string or
not.
28. Write a program that inputs a line of text and prints out the count of vowels in it.
e) print(2*country)
30. Write a program to find sum of all even numbers and odd numbers up to ‘N’
numbers. (the value ‘N’ given by the user)
SECTION-D
2x4=8
31.a) Write a program that asks the user for a string s and a character c; and then it
prints out the location of each character c in the string s.
b) write a program that asks the user for a string (only single space between words)
and replace every space in a string with a hyphen (‘-’).
32. Write a program to remove all duplicate elements from a given list:
List1 = [12,12,34,34,56,11,32,32,11,10,10]
SECTION-E
3x5=15
33. Write a python program to read a list of n integers and find their median. The median
value of a list of values is the middle one when they are arranged in order. If there
are two middle values then take their average.
34. Write a program to input line(s) of text from the user until enter is pressed. Count the
total number of characters in the text (including white spaces), total number of
alphabets, total number of digits, total number of special symbols and total number
of words in the given text. (Assume that each word is separated by one space.)
35. a) Write a python program to find the frequency of a number in a list. (Values are
obtain
ed at
runtim
e).
(3)
X, Y=7,2
print (X, Y)