mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 18:32:56 +01:00
Use python examples that work
This commit is contained in:
parent
935bd5275a
commit
801fa1e84b
2 changed files with 20 additions and 18 deletions
|
|
@ -1,12 +1,13 @@
|
||||||
from banana import *
|
import banana
|
||||||
|
|
||||||
|
|
||||||
class Monkey:
|
class Monkey:
|
||||||
# Bananas the monkey can eat.
|
# Bananas the monkey can eat.
|
||||||
capacity = 10
|
capacity = 10
|
||||||
def eat(self, N):
|
def eat(self, n):
|
||||||
'''Make the monkey eat N bananas!'''
|
"""Make the monkey eat n bananas!"""
|
||||||
capacity = capacity - N*banana.size
|
self.capacity -= n * banana.size
|
||||||
|
|
||||||
def feeding_frenzy(self):
|
def feeding_frenzy(self):
|
||||||
eat(9.25)
|
self.eat(9.25)
|
||||||
return "Yum yum"
|
return "Yum yum"
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,13 @@
|
||||||
from banana import *
|
import banana
|
||||||
|
|
||||||
|
|
||||||
class Monkey:
|
class Monkey:
|
||||||
# Bananas the monkey can eat.
|
# Bananas the monkey can eat.
|
||||||
capacity = 10
|
capacity = 10
|
||||||
def eat(self, N):
|
def eat(self, n):
|
||||||
'''Make the monkey eat N bananas!'''
|
"""Make the monkey eat n bananas!"""
|
||||||
capacity = capacity - N*banana.size
|
self.capacity -= n * banana.size
|
||||||
|
|
||||||
def feeding_frenzy(self):
|
def feeding_frenzy(self):
|
||||||
eat(9.25)
|
self.eat(9.25)
|
||||||
return "Yum yum"
|
return "Yum yum"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue