【发布时间】:2022-06-21 23:19:21
【问题描述】:
我正在尝试编写一些程序来显示我之前在打印语句中编写的变量,但每当我运行代码时它不会显示变量,它只是说“无”。
我的代码:
sidewalkclosed = True
raining = True
xPos = 400
yPos = 400
print("Your robot is located at",print(yPos),"on the y axis and",print(xPos),"on the x
axis.")
【问题讨论】:
-
print(f"Your robot is located at {yPos} on the y axis and {xPos} on the x axis.")
标签: python