#评论 [英] #comments

查看:64
本文介绍了#评论的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



这个游戏的新手。尝试了以下内容。


data = raw_input(" Type something")#spaces"

myInput = data

print" you typed" myInput#再次

print"第四个字符是'myInput [3]#再次


当我在shell中运行它时出现错误警告第二条评论

(实际上指向myInput的t)如果我删除评论,我会得到

第三条评论。有什么不对吗?


肯。

Hi,
New to this game. Have tried the following.

data=raw_input("Type something ") # spaces after "something"
myInput=data
print "You typed " myInput # and again
print "The fourth character is "myInput[3] # and again

When I run it in the shell I get error warnings for the second comment
( actually pointing to the t of myInput ) If I remove the comment I get
one for the third comment. What is wrong please?

Ken.

推荐答案

2004年9月13日星期一22:27:32 +0100,Ken Parkes写道:

哎呀,抱歉本来应该是

data = raw_input(&输入内容)#space后面的空格;某事物

myInput = data

print" you typed myInput#再次

print"第四个字符是" myInput [3]#再次


Ken。

On Mon, 13 Sep 2004 22:27:32 +0100, Ken Parkes wrote:
Oops, sorry that should have been
data=raw_input("Type something ") # spaces after "something"
myInput=data
print "You typed " myInput # and again
print "The fourth character is " myInput[3] # and again

Ken.


2004年9月13日22:27:32 Ken Parkes< cb ***** @ NOSPAMrosecott.ukfsn.org>写道:
On 13 Sep 2004 22:27:32 Ken Parkes <cb*****@NOSPAMrosecott.ukfsn.org> wrote:

这个游戏的新手。尝试了以下内容。

data = raw_input(" Type something")#ssets"
myInput = data
print" you typed" myInput#再次打印
打印你打字,myInput#再次#note逗号打印第四个字符是myInput [3]#再次打印
打印第四个字符是,myInput [3]#再次#相同
当我在shell中运行它时,我得到第二条评论的错误警告
(实际指向myInput的t)如果我删除评论我得到了第三条评论。有什么不对吗?
Hi,
New to this game. Have tried the following.

data=raw_input("Type something ") # spaces after "something"
myInput=data
print "You typed " myInput # and again print "You typed ", myInput # and again # note the comma print "The fourth character is "myInput[3] # and again print "The fourth character is ", myInput[3] # and again # same
When I run it in the shell I get error warnings for the second comment
( actually pointing to the t of myInput ) If I remove the comment I get
one for the third comment. What is wrong please?



打印声明为:

print item1,item2 ....


The print statement is :
print item1, item2 ....




哦,领主,重新开始: -


data = raw_input(" Type something")#stherx after" something"

myInput = data

print" you typed" myInput#再次

print"第四个字符是myInput [3]#再次

Oh lord, start again:-

data=raw_input("Type something ") # spacer after "something"
myInput=data
print "You typed " myInput # and again
print "The fourth character is "myInput[3] # and again


这篇关于#评论的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆