- 分享
2023/10/28 20:50
- 2023-10-28 20:51:04 @
a=input()
print("My height is ",a,"cm.",sep='')
1 条评论
-
leesa LV 8 @ 2023-10-28 21:11:00
PI = 3.1415926 t = 56.789 print("PI=",PI) print("%.3f - %.2f" %(PI,t)) name = '张三' age = 22 m = 2.34 #格式化"张三今年22岁,今天有零钱2.34元" print("%s今年%d岁,今天有零钱%.2f元" % (name,age,m)) print("{}今年{}岁,今天有零钱{}元".format(name,age,m)) print("{0}今年{1}岁,今天有零钱{2}元".format(name,age,m)) print(f"{name}今年{age}岁,今天有零钱{m}元")
- 1