热门

最新

红包

立Flag

投票

同城

我的

发布
m0_57743728
m0_57743728
5 年前
truem0_57743728

[Python]
请问这个程序设计里面怎么确保分子分母的因数只有1呀~
Design a class ‘fractions’ so that the fractions can be directly added and subtracted like integers.
For example, 2/1+3/5=13/5, and make sure that the numerator and denominator do not have a common factor greater than 1.(hint: overwrite __str__, __add__, __sub__ methods)……

你问我答
CSDN App 扫码分享
分享
评论
点赞
打赏
  • 复制链接
  • 举报
下一条:
求助想删除这个debian但是格式化F盘后都找不到debian了然后又开机他还是这个界面qaq
立即登录