输入两个实数xy编程计算出x+y的值。Python
代码如下:
x = float(input("请输入实数x:"))
y = float(input("请输入实数y:"))
result = x + y
print("x + y的值为:", result)
运行效果:
请输入实数x:2.5
请输入实数y:3.7
x + y的值为: 6.2
原文地址: https://www.cveoy.top/t/topic/W7s 著作权归作者所有。请勿转载和采集!
安全问答是一个知识全球问答,包含丰富的问答知识
代码如下:
x = float(input("请输入实数x:"))
y = float(input("请输入实数y:"))
result = x + y
print("x + y的值为:", result)
运行效果:
请输入实数x:2.5
请输入实数y:3.7
x + y的值为: 6.2
原文地址: https://www.cveoy.top/t/topic/W7s 著作权归作者所有。请勿转载和采集!