Professional Documents
Culture Documents
KITS STUDENTS COPY
KITS STUDENTS COPY
return y*y#441
def rev(x:int):#x=441
pro=0
while x>0:#441>0,44>0,4>0,0>0
rem=x%10#4
pro=pro*10+rem#144
x=x//10#0
return pro
a=int(input())#12
sq1=square(a)#144
#print(sq1)
reverse1=rev(a)#21
#print(reverse1)
sq2=square(reverse1)#441
#print(sq2)
reverse2=rev(sq2)#144
#print(reverse2)
if sq1==reverse2:
print("ADAM NUMBER")
else:
def funcA(n):#n=1
if n>0:
funcB(n-1)#19,8,3,0
def funcB(n):#n=0
if n>1:
a=int(input())
funcA(a)#20
''' funcA(20):
print(20)
funcB(20-1)=19
print(19)
funcA(19//2)=9
print(9)
funcB(9-1)=8
print(8)
funcA(8//2)=4
print(4)
funcB(4-1)=3
print(3)
funcA(3//2)=1
print(1)
class goa():
name=""
address=""
drinks=""
def drink(self):
def beach(self):
ramesh=goa()
ramesh.name="Ramesh"
print(ramesh.name)
ramesh.address="e6t567fuyt78"
print(ramesh.address)
ramesh.drinks="yes"
print(ramesh.drinks)
if ramesh.drinks=="yes":
ramesh.drink()
else:
ramesh.beach()
suresh=goa()
print(suresh.name)
print(suresh.address)
suresh.drinks="no"
print(suresh.drinks)
if suresh.drinks=="yes":
suresh.drink()
else:
suresh.beach()
class voting():
def __init__(self,ag):#ag=15
print("Constructor is invoked")
self.ag=ag
def verify(self):
if ag>=18:
else:
def __del__(self):
print("Constructor is deleted")
print("-----VOTING CAMP-----")
ag=int(input())#15
obj=voting(ag)
obj.verify()
del obj
a=int(input())#7
b,d,even,odd=0,0,0,0
c=1
print(c,end=" ")#1
odd=odd+1#1
for i in range(2,a+1):#2,3,4,5,6,7,8
d=b+c#13
print(d,end=" ")#1 2 3 5 8 13
if d%2==0:
even=even+1#2
else:
odd=odd+1#5
b=c#b=1,b=1,b=2,b=3,b=5,b=8
c=d#c=1,c=2,c=3,c=5,c=8,c=13
print()
print(even)#2
print(odd)#5
else:
print("Invalid Input")
class a():
def __init__(self):
print("A")
def display(self):
def __init__(self):
super().__init__()
print("B")
def display(self):
class c(b):
def __init__(self):
super().__init__()
print("C")
def display(self):
obj1=b()#
obj=c()
class shape():
def __area(self):
return 0
class rectangle(shape):
def __area(self,a,c):
print("Area of Rectangle:",a*c)
def input(self):
l=int(input())
b=int(input())
self.__area(l,b)
obj=rectangle()
obj.input()
class Person:
def __init__(self,name):
self.name=name
print(self.name)
class Student(Person):
def __init__(self,name,grade):
self.grade=grade
super().__init__(name)
print(self.grade)
obj=Student(a,b)
class vehicle:
def start(self):
print("Vehicle Started")
class car(vehicle):
def start(self):
print("Car Started")
a=car()
a.start()
b=vehicle()
b.start()