要求变量初始化格式为a=3b=4 s=9.6y=6.0z=-14.6c1等于字符串儿ac2等于字符串儿b 请编写程序包括定义变量和设计输出
时间: 2023-04-09 17:03:33 浏览: 127
高中历史之历史百科汉代吃火锅撸串儿喝酒很流行素材
以下是程序代码:
a = 3
b = 4
s = 9.6
y = 6.0
z = -14.6
c1 = "字符串儿a"
c2 = "字符串儿b"
print("a =", a)
print("b =", b)
print("s =", s)
print("y =", y)
print("z =", z)
print("c1 =", c1)
print("c2 =", c2)
输出结果为:
a = 3
b = 4
s = 9.6
y = 6.0
z = -14.6
c1 = 字符串儿a
c2 = 字符串儿b
阅读全文