Skip to content

Latest commit

 

History

History
14 lines (9 loc) · 370 Bytes

95 怎么打印出分数.md

File metadata and controls

14 lines (9 loc) · 370 Bytes

Python100

把Python知识点整理成100道习题,知识点来自两本书:Python基础教程(第3版)和流畅的Python,以后会定期加入更多的习题,大家帮忙点个赞哈,点赞越多,更新越快~

怎么打印出分数

用 fractions 中的 Fraction 方法

>>> from fractions import Fraction
>>> print(Fraction(1, 3))
1/3