浙大版《Python 程序设计》题目集 第2章-2 计算分段函数[1] (10分)

x = float(input())
if x == 0:
    print('f(0.0) = 0.0')
else:    
    print('f({:.1f}) = {:.1f}'.format(x,1/x))
发布了13 篇原创文章 · 获赞 0 · 访问量 53

猜你喜欢

转载自blog.csdn.net/weixin_42229583/article/details/104553636