Python——报错解决:AttributeError: module ‘math‘ has no attribute ‘cell‘
一、完整报错:
num = math.cell(photosListLength * 0.1)
AttributeError: module 'math' has no attribute 'cell'
二、部分代码:
import math num = math.ceil(photosListLength * 0.1)
三、原因:
只导入了math模块,其中的ceil方法并没有导入
四、解决办法:
from math import ceilnum = ceil(photosListLength * 0.1)
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
