学习-Python模块之自定义模块
# 请在下面的 Begin-End 之间按照注释中给出的提示编写正确的代码
########## Begin ##########
# 导入 sphere 模块
import sphere
# 使用 input 函数获取球体的半径
R=int(input())
# 调用 sphere 模块中的方法来实现球体表面积、体积的计算
V=sphere.volumn(R)
S=sphere.area(R)
print(V)
print(S)
########## End ##########
练习-Python模块之自定义模块
命令行输入pip install nltk
代码块代码为:
# 请在下面的 Begin-End 之间按照注释中给出的提示编写正确的代码
########## Begin ##########
# 导入 nltk 模块,检验该模块是否安装成功,打印该模块的版本信息
import nltk
print(nltk.__version__)
########## End ##########