程序代码:
#导入math文件
import math
#换算时间
min = 6 * 60
#计算分裂次数
num = min / 20
#计算大肠杆菌最终数量
quantity = 20000 * (2 ** num)
#输出结果
print(quantity)
#查看运行过程
dir(math)
help(math.sqrt)
运行过程和结果:
PS C:\Users\郝锦杰\Desktop\大一文件\研讨课python> & 'C:\Users\郝锦杰\AppData\Local\Programs\Python\Python37\python.exe' 'c:\Users\郝锦杰\.vscode\extensions\ms-python.python-2021.11.1422169775\pythonFiles\lib\python\debugpy\launcher' '51287' '--' 'c:\Users\郝锦杰\Desktop\大一文件\研
讨课python\1.py'
5242880000.0
Help on built-in function sqrt in module math:
sqrt(x, /)
Return the square root of x.