728x90
반응형
728x170
from fractions import Fraction
fraction = Fraction(3, 4)
print(fraction + 1.5)
"""
2.25
"""
728x90
반응형
그리드형(광고전용)
'Python > fractions' 카테고리의 다른 글
[PYTHON/FRACTIONS] Fraction 클래스 : 분수 사용하기 (0) | 2019.06.22 |
---|
댓글을 달아 주세요