0% found this document useful (0 votes)
31 views5 pages

11 CS Quarterly

exam related qp

Uploaded by

sriram vani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views5 pages

11 CS Quarterly

exam related qp

Uploaded by

sriram vani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

VANI VIDYALAYA

GRADE:11 COMPUTER SCIENCE MARKS:70

SECTION-A
18X1=18

1. Who developed Python Programming Language?

A) Wick van Rossum B) Rasmus Lerdorf C) Guido van Rossum D)


Niene Stom

2. Which of the following is the correct extension of the Python file?

A).python B) .pys C) .py D) .p

3. Full form of IDLE is __________.

A) Indigenous Development Lab B) Integrated Development


Environment

C) Integrated Developers Local Environment D) Indian Developers Environment

4. What will be the value of the following Python expression?

1 + 10 % 4

A) 3 B) 2 C) 11 D) 1

5.What is displayed when print an empty string?

A)0 B)1 C) Name of the string D) Blank space

6.Right index in list starts from ________________.

A)0 B)1 C)-1 D)-2

7. The _______operator is used to find out if division of two numbers yields any
remainder.

A)/ B)+ C)% D)//

8. Which of the following operators is the correct option for power(ab)?

A) a^b B) a**b C) a^^b D) a^*b

9. Choose the correct syntax for printing values in the same line.

A) print (a, b) B) print (a, end="", b) C) print (a, end="$", b) D) print(a)


print(b)

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

11. which operator is used to replicate string?

A) + B)- C) * D)/

12. sort () does not work for which type of data members of a list?

A) Integer B) string C) tuple D) complex numbers

13. which function is used to convert a sequence data type into a tuple?

A) update () B) tuple () C) append () D) create ()

14. Tuples are __________.

A) Mutable B) Immutable C) Mutable to some extent D) None of


the above

15. If list1 is [30,55,28,24,32], what is max(list1)?

A) 55 B)30 C)28 D)32

16. break in python is used ________________.

A) To restart a loop B) Terminate a loop C) To jump in between the loop


D) None of the above

Q17 and Q18 are ASSERTION and REASONING based questions. Mark the
correct choice as

A) Both A and R are true and R is the correct explanation for A

B) Both A and R are true and R is not the correct explanation for A

C) A is True but R is False

D) A is false but R is True

17. Assertion(A): List is an immutable data type

Reasoning(R): When an attempt is made to update the value of an immutable


variable, the old variable is destroyed and a new variable is created by the same
name in memory.

18. Assertion(A): Python variables do not need to be declared before use.


Reasoning(R): Python variables are dynamically typed, meaning they can change
their type
depending on the value assigned to them.
SECTION-B
7X2=14
19.Find the output of the following:

If the value of A= 30, B=40.

i)print(A<B) ii) print(A>B) iii) print(A==B) iv) print (A! =B)

20. Write a python program to find the square and cube of a number. (Get the number
from the user)

21.What are keywords? Write some commonly used keywords in Pythons?

22.Which string method is used to implement the following:

i) To count the number of characters in the string.

ii) To change the first character of the string to uppercase.

iii) To check whether a given character is a letter or a number.

iv) To change lowercase letters to uppercase.

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=[ ['a','b','c'], [0,1,2,3],[23,45,67,89] ]


list1[0][2] =list1[2][2]

list1[2][1] =list1[1][3]

print(list1)

25.What is an infinite loop? Give one example

SECTION-C 5x3=15

26. What will be the output of the following python code?

a=1; b=2; c=3; d=4; e=0;

e = (a + b) *c/d

print (“Value of (a + b) *c/d is “, e)

f = ((a + b) *c)/d

print (“Value of ((a + b) *c)/d is”, f)

g = (a + b) *(c/d)
print (“Value of (a + b) * (c/d) is”, g)

h=a+(b*c)/d;

print (“Value of a+(b*c)/d is”, h)

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.

29.Consider the following string country:

country= "Great India"

What will be the output of the following string operations: -

a) print (country [0: len(country)])

b) print (country [-7: -1])

c) print (country [::2])

d) print (country [len (country)-1])

e) print(2*country)

f) print (country [:3] + country [3:])

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)

b) Predict the output of the following


(2)

X, Y=7,2

X, Y, X =X+1, Y+3, X+10

print (X, Y)

You might also like