TypeError:'float'object cannot be interpreted as an integer
카탈로그
문제를 해결하다
해결 방향
해결 방법
문제를 해결하다
TypeError: 'float' object cannot be interpreted as an integer
해결 방향
유형 오류: "float"객체는 정수로 해석할 수 없습니다.
해결 방법
python2와python3의 연산자 차이 코드에/가 있는지 확인하고python3의/결과에 부동점수가 있는지 확인하십시오!python2의//는python3의//는python3에서//는 정제-복귀 업체의 정수 부분을 나타낸다(아래로 정제)
print(5/2,5//2) # 2.5 2
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
왼쪽에서 오른쪽으로div의 배경색이 천천히 나타납니다텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.