python-3.x - 导入数学模块 - Python
问题描述
我正在运行一些基本的 python 函数。当我尝试导入数学模块时,它似乎无法正常工作。这是我收到的代码。
In [5]: import math
In [6]: 2^3
...: (2)^3
...: 2^(3)
...: 2**3
...: improt math
File "<ipython-input-6-92c86fb66a5e>", line 5
improt math
^
SyntaxError: invalid syntax
In [7]2**3
Out [7]: 8
In [8]: import math
...: math.sqrt (81)
...:
...: math
...: math .sqrt(81)
...: sqrt(81)
...: 2**3
除了玩弄基本功能之外,我还没有配置程序或做任何事情。但它没有导入数学模块。知道为什么吗?
解决方案
你有一个错字 -improt
在第 5 行
推荐阅读
- javascript - 随机化字符串中的每个字符大小写
- flutter - 控制 Flutter ListView 的滚动
- flutter - 是否可以只需要 Dart 中的两个参数之一?
- c# - 如何在 Visual Studio 的每个类方法中插入打印语句
- google-apps-script - 谷歌应用脚本触发器不发送电子邮件
- swift - 斯威夫特 | Switch 语句:等到案例完成后再继续下一个案例
- mockito - 带有 JUnit 5 的 Powermock 或 PowerMockito
- spacy - 如何获取未发布的 spaCy 版本 (v3) 的模型?
- corda - 在 VaultCustomQuery 中获取帐户名称
- android - 如何在 Android Studio 中的 ListView 中显示 Html 列表