0% found this document useful (0 votes)
4 views2 pages

Computer Science Assignment

The document is a summer vacation assignment worksheet for Class 12 Computer Science, containing various questions related to Python programming. It includes topics such as data types, error handling, identifiers, literals, and basic programming tasks. Students are required to answer questions, write code, and explain concepts related to Python.

Uploaded by

smaheshwari1910
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)
4 views2 pages

Computer Science Assignment

The document is a summer vacation assignment worksheet for Class 12 Computer Science, containing various questions related to Python programming. It includes topics such as data types, error handling, identifiers, literals, and basic programming tasks. Students are required to answer questions, write code, and explain concepts related to Python.

Uploaded by

smaheshwari1910
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/ 2

Summer Vacation Assignment Worksheet 2025

Computer Science
Class 12
1 „Welcome‟ is literals
2 $symbol can be used in naming an identifier(True/False)
3 Write any 2 data types available in Python
4 „Division by zero‟ is an example of error.
5 range(1,10) will return values in the range of to
6 randint(1,10) will return values in the range of to
“Computer Science”[0:6] =
7
“Computer Science”[3:10] =

“Computer Science”[::-1] =
“Computer Science”[-8:]=
8 Output of: print(“Ok”*4+“Done”)
9 Output of: print(print(“Why?”))
Raj was working on application where he wanted to divide the two
number (A and B) , he has written the expression as C = A/B, on
execution he entered 30 and 7 and expected answer was 4 i.e. only
10 integer part not in decimal, but the answer was 4.285 approx, help
Raj to correct his expression and achieving the desired output.
Correct Expression :

Can you guess the output?


C=-11%4
11
print(C)

12 Write 2 advantages and disadvantages of Python programming language


13 Identify the valid and Invalid identifiers names:
Emp-Code,_bonus,While,SrNo.,for,#count,Emp1,123Go,Bond007
14 Identify the type of literals for each:
(i) 123
(ii) „Hello‟
(iii) „Bye\nSeeYou‟
(iv) „A‟
(v) 345.55
(vi) 10+4j
(vii) 0x12
15 What is the size of each string?
(i) „Python‟
(ii) „Learning@\nCS‟
(iii) „\table‟

Page:1
16 Output of:
(i) True+True=
(ii) 100+False=
(iii) -1+True=
(iv) bool(-1+True)=
17 Output of
(i) 2*7 =
(ii) 2**7 =
(iii) 2**2**3 =
(iv) 17%20 =
(v) not(20>6)or(19>7)and(20==20) =
18 Output of:
a,b,c=20,40,60 b+=10
c+=b
print(a,b,c)

19 Write a program to enter 2 number and find sum and product


20 What do you mean by Python Shell’s “Script Mode”?
21 What do you mean by Python shell’s “Interactive Mode”?
22 What is a python Statement?
23 What are Keywords, Identifiers, Variable?

24 What is the difference between List and Tuple?


25 What is the difference between List and String?
26 What is ordered and unordered collection? Give example of each
What is type conversion in Python? What are different types of
27
conversion? Illustrate with example.
Fill in the blanks to execute infinite loop:
28 while :
print(“spinning”)

Page:2

You might also like