[go: up one dir, main page]

0% found this document useful (0 votes)
25 views4 pages

Summer Holidays Homework - 12computer Science

The document outlines summer holiday homework for computer science, consisting of various questions related to programming concepts, Python syntax, and practical coding tasks. It includes multiple-choice questions, assertions, and coding exercises that require students to demonstrate their understanding of Python programming. Additionally, it emphasizes the importance of completing practical files and revising the syllabus in preparation for upcoming examinations.

Uploaded by

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

Summer Holidays Homework - 12computer Science

The document outlines summer holiday homework for computer science, consisting of various questions related to programming concepts, Python syntax, and practical coding tasks. It includes multiple-choice questions, assertions, and coding exercises that require students to demonstrate their understanding of Python programming. Additionally, it emphasizes the importance of completing practical files and revising the syllabus in preparation for upcoming examinations.

Uploaded by

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

SUMMER HOLIDAYS HOMEWORK

COMPUTER SCIENCE

SOLVE THE FOLLOWING QUESTIONS:

Q1: What will be the output of the following statement: 1


print(3-2**2**3+99/11)
a. 244 b. 244.0 c. -244.0 d. Error
Q2: Select the correct output of the code: 1

Q3: Which of the following will delete key-value pair for key = “Red” from a 1
dictionary D1?
a. delete D1("Red")
b. del D1["Red"]
c. del.D1["Red"]
d. D1.del["Red"]

Q4: Consider the statements given below and then choose the correct output 1
from the given options:
pride="#G20 Presidency"
print(pride[-2:2:-2])
a. ndsr b. ceieP0 c. ceieP d. yndsr

5: Which of the following statement(s) would give an error during execution 1


of the following code?
tup = (20,30,40,50,80,79)
print(tup) #Statement 1
print(tup[3]+50) #Statement 2
print(max(tup)) #Statement 3
tup[4]=80 #Statement 4
a. Statement 1 b. Statement 2 c. Statement 3 d. Statement 4
Q6: Consider the code given below: 1

Which of the following statements should be given in the blank for #Missing
Statement, if the output produced is 110?
a. global a
b. global b=100
c. global b
d. global a=100
Q7: Which of the following is a valid identifier? 1
a. Student Name b. 3Number c. %Name% d. Block_number
Q8: A variable created or defined within a function body is classified as: 1
a. local b. global c. built-in d. instance
Q9 and 10 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
Q9: Assertion(A): Dictionaries in Python are mutable. 1
Reasoning(R): The data inside a dictionary is stored as the key: value pairs
enclosed within the curly braces {}
Q10: Assertion(A): To use positional arguments, the arguments need to be 1
passed in the same order as their respective parameters in the function
definition. Reasoning(R): If three positional arguments are to be passed to
the function, the first argument will be assigned to the first parameter,
second argument to the second parameter and the third argument to the third
parameter.
Q11: Anamika was writing a code. While writing she has done some mistakes. 2
Help her by rewriting the code again. Also underline each correction done
in the code.
Value = 30
for VAL in range(0, Value)
IF VAL%4=0:
print(val*4)
ElseIf VAL%5==0:
print(VAL+3)
else
print(VAL+10)
Q12: Predict the output of the following code: 2

Q13: Help Fatima to identify the local and Global variable in the following code: 2
x=100
def myfunc(a):
k=a
print(k,a)
p=(0,1,2,3,4)
myfunc(p)
print(x)

Q14: Bunny wants to perform the following tasks on the list. Tell him the most 2
appropriate methods to do so.
(a) Delete a given element from the list
(b) Get the position of an item in the list.
(c) Delete the 3rd element from the list.
(d) Add a single element at the end of the list.

Q15: Cshelvi has to shift a list arr of numbers where n is a numeric value by 3
which all elements of the list are to be shifted to the left. Write function in
python to help Cshelvi in achieving her task.
Sample input data of the list arr=[1,2,3,4,5,6]
Output arr=[3,4,5,6,1,2]

Q16: Deepak is counting the number of characters in a string. Assuming yourself 3


as Deepak, do write a function that counts the frequency of character in the
string.
Sample input string= 'comma'
Output : {'c':1,'o':1,'m':2,'a':1}

Q17: Elena has to find sum of all items in a list. Do write a function to find sum 3
of all items in list.
Q18: Write a python function to get the largest number from a list (1,2,-8,0). 3
Q19: Predict the output of the following code: 3

Q20: Predict the output of the Python code given below: 3

Q21: Hindustan Chemicals Ltd. is a company that deals in manufacture and 4


export of chemicals across the world and has hundreds of employees on its
roll. It wishes to computerize the process of salary generation. Write a
python program to enter the names of employees and their salaries as input
and store them in a dictionary and also represent the data as a Salary
Generation Report.

2. COMPLETE THE PRACTICAL FILE AND STUDY THE PROJECT FILE WORK
FOR 2025-26 (TOPIC AS PER CBSE LIST, TITLE PAGE,INDEX CERTIFICATE ETC)
ON CBSE WEBSITE.

3. REVISE THE SYLLABUS THAT HAS BEEN DONE IN THE CLASS AND COLLECT
AND STUDY THE CBSE BOARD EXAMINATION PAPERS AND SAMPLE PAPERS
FOR THE YEARS 2022-2023,2023-24 AND 2024-2025.

You might also like