# 猴子摘香蕉 import sys # 找到箱子 def move(): global i while True: a_1= input("输入你下步走的地方:") while True: if a_1 == b: i += 1 print('找到箱子,通过第一关,进入第二关') push() else: i += 1 print('离箱子还很远继续走') break # 推动箱子 def push(): global i while True: a_1= input("输入你想把箱子推到的地方:") while True: if a_1 == c: i += 1 print("已移动到了香蕉下方,通过第二关,进入第三关") stand() else: i += 1 print("没有移动到了香蕉下方,继续移动") break # 站在箱子上 def stand(): global i print('1 爬上箱子或摘香蕉 0 不爬箱子或不摘香蕉') while True: a_1 = bool(int(input("输入你接下来要做的事:"))) while True: if a_1 == Tru
python实现 猴子摘香蕉
最新推荐文章于 2024-03-20 11:43:56 发布