测验1:Python基本语法元素(第一周)


 

 二:程序设计题

1. 

1 temp = input()
2 t = eval(temp)
3 if t == 0:
4     print("Hello World")
5 elif t > 0:
6     print("He\nll\no \nWo\nrl\nd")
7 elif t < 0:
8     print("H\ne\nl\nl\no\n \nW\no\nr\nl\nd\n")

 

2. 

1 temp = input()
2 t = eval(temp)
3 print("{:.2f}".format(t))

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM