from time import sleep
class HotDog:
def __init__(self):
self.cooked_level = 0
self.cooked_string = "半生不熟"
self.condiments = []
def cook(self, time):
self.cooked_level += time
if self.cooked_level > 8:
self.cooked_string = "呵呵呵,烤糊了"
elif self.cooked_level > 5:
self.cooked_string = "完美"
elif self.cooked_level > 3:
self.cooked_string = "五分熟"
else:
self.cooked_string = "半生不熟"
myDog = HotDog()
print("烹饪时间到!\n")
sleep(1)
someTime = int(input())
"""咨询下
怎么
在这里
换行
?"""
sleep(1)
print("OK\n")
sleep(1)
print("请耐心等待十五秒\n")
myDog.cook(someTime)
sleep(15)
print("看看怎么样吧!\n")
print(myDog.cooked_string)
|