Discuss / Python / 输入之后回车是这样的

输入之后回车是这样的

Topic source

>>> print("1024*768="1024*768)

  File "<stdin>", line 1

    print("1024*768="1024*768)    

这是什么情况啊

>>> print("1024*768=",1024*768)

试试加个逗号

弄好了  就是这个

C:\Workspace> python hello.py
Michael
hello, Michael

一直没弄好  能说下是怎么弄的吗

怎么弄也不对

华耶yeah

#5 Created at ... [Delete] [Delete and Lock User]

中间缺了逗号

print ('请输入你的名字')

name = input()

#输入你的名字

print ('hello',name)

print (‘1024*768 = ’,1024*768)

 print("1024*768=",1024*768)

然后你这是在交互模式下不是可以直接算嘛


  • 1

Reply