TypeError:'float'object cannot be interpreted as an integer

755 단어 Computerknowledge
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

 
 
 
 
 
 
 

좋은 웹페이지 즐겨찾기