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

CSC WS 1

The document contains a series of questions related to Python programming, covering topics such as arithmetic and logical operators, output predictions for expressions, data types, valid and invalid identifiers, and syntax corrections in code. It also includes tasks for rewriting code with syntax errors and predicting outputs from given Python code snippets. The questions are aimed at assessing knowledge and understanding of Python concepts for Class XII students.

Uploaded by

amirthaa.asp2009
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)
55 views4 pages

CSC WS 1

The document contains a series of questions related to Python programming, covering topics such as arithmetic and logical operators, output predictions for expressions, data types, valid and invalid identifiers, and syntax corrections in code. It also includes tasks for rewriting code with syntax errors and predicting outputs from given Python code snippets. The questions are aimed at assessing knowledge and understanding of Python concepts for Class XII students.

Uploaded by

amirthaa.asp2009
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/ 4

Velammal Vidyalaya Alapakkam

Class:XII-CSC
1 Which of the following is a valid arithmetic operators in Python
(i) // (ii) ? (iii) < (iv) and
2 Which of the following operator(s) are valid logical operators
(i) Like (ii) and (iii) or (iv) is
3 What will be the output of following expressions:
(i) 7/2 (ii) 7//2
4 If given A=20, B=15, C=30, What will be the output of following expression:
print((A>B) and (B>C) or (C>A))
5 What will be the output of following expressions:
(i) 15//2 (ii) 15%2
6 What will be the output of following expression:
2**2**4
7 Write the type of tokens from the following
(i) If (ii) roll_no
8 Identify the valid identifier(s) from the given list:
Marks1, $Roll, Avg Marks, IF, _sales2008, while, name
9 Identify the invalid identifiers from the given list:
Average, RegNo. , break, Sales_Q1
1 Write the datatype of following literals:
0 (i) 100 (ii) False

1 Write the datatype of following literals:


1 (i) 50.7 (ii) “India”

1 What will be the output of following code:


2 print(print(10))

1 Name the Python Library module which need to be imported to invoke the following function:
(i) floor() ii) ceil (iii) randint() (iv) sin()
3
1 Rewrite the following code in python after removing all syntax error(s). Underline each correction
4 done in the code.
30=To
for K in range(0,To)
IF k%4==0:
print (K*4)
Else:
print (K+3)
1 Rewrite the following code in python after removing all syntax error(s). Underline each correction
5 done in the code:
a=5
work=tru
e b=hello
c=a+b
FOR i in range(10)
if i%7=0:
continue
1
6

1 Rewrite the following code in python after removing all syntax error(s). Underline each correction
done in the code:
7
a=b=10
c=a+b
While c=<20:
print(c,END="*")
c+=10

1 Find and write the output of the following python code:


8
msg = "Technology 2025"
print(msg[3:])
print(msg[:4],msg[4:])
print(msg[::-1])
print(msg[0:4],msg[11:10])

1 Predict the output


9

2 Predict the output


0
22 Find and write the output of the following python code:

23 How many times will the following for loop execute and what‟s the output?

24

25 Predict the ouput

You might also like