python import 另一个py模块 没反应也不报错

在Mac上使用Python 3.7版本时,遇到导入名为'games'的模块没有反应也不报错的情况。用户安装了Python 2.7和3.74两个版本,并尝试在'simple game'文件中导入'games'模块,但该操作并未产生预期效果。目前问题在于导入模块后无任何输出或错误提示,寻求解决方案。
摘要由CSDN通过智能技术生成

Mac上有内置python2.7我又下载的3.74
下面两个py文件,simple game import games
问题是不报错也不显示,请大神求解!!!
这就没反应了 回车以及输入什么都没用

# Game
# 演示模块的创建

class Player(object):
    """ A player for a game."""
    def __init__(self, name, score = 0):
        self.name = name
        self.score = score

    def __str__(self):
        rep = self.name + ":\t" + str(self.score)
        return rep

def ask_yes_no(question):
    """Ask a yes or no question."""
    response = None
    while response not in ("y", "n"):
        response = input(question).lower()
    return response
def ask_number(question, low, high):
    """Ask for a number within a range."""
    response = None
    while response not in range(low, high)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值