UNPKG
code-example
Version:
latest (3.3.7)
3.3.7
3.3.6
3.3.5
3.3.4
3.3.3
3.3.2
3.3.1
3.3.0
3.2.0
3.1.0
3.0.6
3.0.5
3.0.4
3.0.3
3.0.1
3.0.0
2.0.0
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
Language code example.
github.com/jaywcjlove/code-example
jaywcjlove/code-example
code-example
/
txt
/
sample.python.txt
14 lines
(10 loc)
•
269 B
Plain Text
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import
banana
class
Monkey
:
# Bananas the monkey can eat.
capacity =
10
def
eat
(
self, n
):
"""Make the monkey eat n bananas!"""
self
.capacity -= n * banana.size
def
feeding_frenzy
(
self
):
self
.eat(
9.25
)
return
"Yum yum"