-2

问题:

给出第一个专有名词:牛奶

给出第二个专有名词:float

这些词一起形成:Milkfloat

noun1 = input("Give the first proper noun: ")
noun2 = input("Give the second proper noun: ")
print("The words together form: "='noun1'+'noun2') 

"='noun1'+'noun2'这不起作用。有人可以帮忙吗?

提前致谢。

4

2 回答 2

0
noun1 = input("Give the first proper noun: ")
noun2 = input("Give the second proper noun: ")
print("The words together form: "='noun1'+'noun2')

noun1 和 noun2 是这里的变量,然后在 '' 引号中打印。他们应该没有引号。在第三个打印行下方找到。

print("The words together form: "+noun1+noun2)
于 2019-11-05T07:58:40.033 回答
0

如果您正在寻找连接名词,这应该可以工作

noun1 = input("Give the first proper noun: ")
noun2 = input("Give the second proper noun: ")
print("The words together form: = "+noun1+noun2)
于 2019-09-24T08:00:46.143 回答