학습 자료

Integer Division Operator //

Unlike the / operator, which returns a floating-point result (a decimal), the integer division operator // discards the decimal part and returns only the integer portion of the division.


For example, dividing 10 by 3 using the / operator yields a result of 3.3333333333333335.

/ Operator Example
result_float = 10 / 3 print(result_float) # 3.3333333333333335

In contrast, using the // operator with 10 divided by 3 returns 3, dropping everything after the decimal point

// Operator Example
result_int = 10 // 3 print(result_int) # 3
Quiz
0 / 1

The integer division operator // rounds up the result of division to return an integer value.

학습 자료

AI 튜터

디자인

업로드

수업 노트

즐겨찾기

도움말

코드 에디터

코드 실행
코드 생성

실행 결과