-
Notifications
You must be signed in to change notification settings - Fork 0
/
inheritance1.py
27 lines (22 loc) · 921 Bytes
/
inheritance1.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
class COUNTRY():
def __init__(self,language,capital,country):
self.language = language
self.capital = capital
self.country = country
def detail(self):
print("the country is ",self.country)
class status(COUNTRY):
def __init__(self,language,capital,country):
COUNTRY.__init__(self,language,capital,country)
self.country = (self.country).upper()
def detail(self):
if self.country =="NEPAL":
print("the country is under developing ","and the language spoken is ",self.language)
else:
print("the country America is develokped ", "and the language sopken is ",self.language)
# # to print country status of NEpal and America is it developing or not developed
a = (input("enter country either Nepl or America : "))
b =(input("enter language spoken : "))
c = (input("Enter capital city : "))
n = status(b,c,a)
n.detail()