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

 

 二:程序设计题

1. 

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

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:Python基本语法元素(第一周)

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

 

相关文章:

  • 2022-01-19
  • 2022-12-23
  • 2021-12-19
  • 2021-12-06
  • 2021-08-08
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-01
  • 2022-12-23
  • 2021-08-06
  • 2021-12-01
相关资源
相似解决方案