CBSE computer and communication technology
Sponsor Area
Out of the following, find those identifiers, which can not be used for naming Variable or Functions in a Python program:
_Cost, Price*Qty, float, Switch,
Address One, Delete, Number12, do
Price*Qty, float, Address One, doThese above identifiers cannot be used for naming Variable or Functions in a python program.
Sponsor Area
Name the Python Library modules which need to be imported to invoke the following functions
(i) load()
(ii) pow()
The Python Library modules which need to be imported to invoke the given functions are,
(i) pickle
(ii) math
Rewrite the following code in python after removing all syntax error(s). Underline each correction done in the code.
for Name in [Amar, Shveta, Parag]
IF Name[0]='S':
print(Name)
for Name in [ 'Amar','Shveta','Parag']:
if Name[0] == 'S':
print(Name)
Find and write the output of the following python code:
Numbers=[9,18,27,36]
for Num in Numbers:
for N in range(1, Num%8):
print(N,'#',end= '' )
print()
Output:
1#
1#2#
1#2#3#
Find and write the output of the following python code:
class Notes:
def __init__(self,N=100,Nt='CBSE'): #constructor
self.Nno=N
self.NName=Nt
def Allocate(self, N,Nt):
self.Nno= self.Nno + N
self.NName= Nt + self.NName
def Show(self):
print(self.Nno,'#',self.NName)
s=Notes()
t=Notes(200)
u=Notes(300,'Made Easy')
s.Show()
t.Show()
u.Show()
s.Allocate(4, 'Made ')
t.Allocate(10,'Easy ')
u.Allocate(25,'Made Easy')
s.Show()
t.Show()
u.Show()
Find and write the output of the following python code:
class Notes:
def __init__(self,N=100,Nt='CBSE'): #constructor
self.Nno=N
self.NName=Nt
def Allocate(self, N,Nt):
self.Nno= self.Nno + N
self.NName= Nt + self.NName
def Show(self):
print(self.Nno,'#',self.NName)
s=Notes()
t=Notes(200)
u=Notes(300,'Made Easy')
s.Show()
t.Show()
u.Show()
s.Allocate(4, 'Made ')
t.Allocate(10,'Easy ')
u.Allocate(25,'Made Easy')
s.Show()
t.Show()
u.Show()
Output:
100 # CBSE
200 # CBSE
300 # Made Easy
104 # Made CBSE
210 # Easy CBSE
325 # Made EasyMade Easy
Sponsor Area
Mock Test Series
Mock Test Series



