类似这样
First name:
Last name:
Age:
Location:
a = input("Please write down your first name:")
b = input("Please write down your last name:")
c = input("Please write down your age:")
d = input("Please write down your location:")
print("First name:",a,"Last name:",b,"Age:",c,"Location:",d)
初步尝试
a = input("Please write down your first name:")
b = input("Please write down your last name:")
print("First name",a /
"Last name",b)
结果会出现
TypeError: unsupported operand type(s) for /: 'str' and 'str'
可是我的print里的数据都是字符串,不理解
a = input("Please write down your first name:")
b = input("Please write down your last name:")
c = input("Please write down your age:")
d = input("Please write down your location:")
print("First name:",a)
print("Last name:",b)
print("Age:",c)
print("Location:",d)
这样就行,有帮助的话采纳一下哦!
print(f"First name: {a}\nLast name:{b}\n Age: {c}\n Location: {d}")