Skip to content

Commit 419f316

Browse files
authored
Merge pull request #63 from Govindrajewar/patch-1
Create python oriented programming
2 parents 7f5ef1b + b02dd15 commit 419f316

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

python oriented programming

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
class Mobile:
2+
def make_call(self):
3+
print("i am making a call")
4+
def play_game(self):
5+
print("i am playing games")
6+
7+
m1=Mobile()
8+
9+
m1.make_call()
10+
11+
m1.play_game()
12+
13+
class Mobile:
14+
def set_color(self,color):
15+
self.color=color
16+
def set_cost(self,cost):
17+
self.cost=cost
18+
def show_color(self):
19+
print("black")
20+
def show_price(self):
21+
print("5000")
22+
def make_call(self):
23+
print("i am making a call")
24+
def play_game(self):
25+
print("i am playing games")
26+
27+
28+
29+
m2=Mobile()
30+
31+
m2.show_price()
32+
33+
m2.show_color()
34+

0 commit comments

Comments
 (0)