CSC WS 1
CSC WS 1
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 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
23 How many times will the following for loop execute and what‟s the output?
24