Xii CS W1 - Python Revision Tour 1 - 2
Xii CS W1 - Python Revision Tour 1 - 2
Xii CS W1 - Python Revision Tour 1 - 2
WORKSHEET - 1
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] =
“Computer Science”[3:10] =
7
“Computer Science”[::-1] =
“Computer Science”[-8:]=
8 Output of : print(“Ok”*4 + “Done”)
9 Output of : print(print(“Why?”))
Output of :
29 a,b,c =
20,40,60 b+=10
c+=b
print(a,b,c)
30 Write a program to enter 2 number and find sum and product
Write a program to enter temperature in Fahrenheit and convert it
31
in Celsius
32 Fill in the blanks to execute loop from 10 to 100 and 10 to 1
(i)for i in range( ): print(i)
(ii)for i in range( ):
print(i)
33 Name the Python Library module which need to be imported to invoke the
following function:
(i) floor() (ii) bar() (iii) randint() (iv) sin()
(v) linspace() (vi) connect() (vii) dump()
(viii) insort()
for i in range(1,6):
for j in range(1,6):
if i==j:
break
print(j, end='')
print()