Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
sainik
#python 3.5.2 class Raja: no_of_sainik=55 def __init__(self, sainik_name,sainik_retirement): self.sainik_ka_naam=sainik_name self.sainik_ki_retirement=sainik_retirement sainik=Raja("rana daggupatti","17 saal baad") print(sainik.sainik_ka_naam) class Praja(Raja): def __init__(self): print("praja hoti hai raja ki") mohanrao=(Praja) mohanrao.age=87 mohanrao.salary=6565 mohanrao.affair_with="raja ki wife" print(mohanrao.age) print(mohanrao.no_of_sainik) print(sainik.sainik_ki_retirement) class Cool(Praja): pass wah=Cool() print(wah.affair_with) print(wah.no_of_sainik)
run
|
edit
|
history
|
help
0
display age
Introduce myself
PySlots
Python: Stack Simple I
Skillenza - Marker Count
hahahah
mat
Sort word in alphabetical order
Prac1_2
StringManipulation