-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpizza.py
More file actions
32 lines (24 loc) · 708 Bytes
/
pizza.py
File metadata and controls
32 lines (24 loc) · 708 Bytes
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
28
29
30
31
#!/usr/bin/python
class Am_I_A_Pizza_Or_Burger:
def __init__(self, what_Am_I = 'pizza'):
self.what_Am_I = what_Am_I
def am_I_a_burger(self):
if self.what_Am_I == 'burger':
return True
else:
return False
def am_I_a_pizza(self):
if self.what_Am_I == 'pizza':
return True
else:
return False
def amIaSportsCar(self):
if self.what_Am_I == 'sportscar':
return True
else:
return False
if __name__ == '__main__':
what_am_i = Am_I_A_Pizza_Or_Burger('pizza')
print(what_am_i.am_I_a_burger())
print(what_am_i.am_I_a_pizza())
print(what_am_i.amIaSportsCar())