忘记了自己之前是看哪个平台上面的python入门视频第一课(对,我只看了第一节课),开心的安装了python以后就再也没有碰过它没想到今天派上了用场,然后找到了一个Crossin的编程教室的网页,可以自己进行小练习,我觉得对于目前的我来说应该够了
没想到在这里学到了觉得最酷的命令:window+r->加上cmd打开超酷的黑底白字,输入了print("Hello World")实现了第一行命令可还行(教程里用的第一声啼哭,原谅我在图书馆里笑出了声)
练习命令行附在这里:
>>> print("Hello World")
Hello World
>>> print"hello"
File "<stdin>", line 1
print"hello"
^
SyntaxError: invalid syntax
>>> print('world')
world
>>> print 1
File "<stdin>", line 1
print 1
^
SyntaxError: Missing parentheses in call to 'print'
>>> print(3.14)
3.14
>>> print(3e30)
3e+30
>>> print 1+2*3
File "<stdin>", line 1
print 1+2*3
^
SyntaxError: Missing parentheses in call to 'print'
>>> print(2>5)
False
>>> 'your yida'
'your yida'
>>> 2+13+250
265
>>> 5<50
True
都是很弱智的命令,而且python3里面print一定要用括号,我用的python3.6 32-bit