欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

笨办法学Python笔记-习题1

程序员文章站 2022-06-15 19:11:05
...
  • 取名为 ex1.py 2
    .py不是指后缀名,而是确指文件名。

  • python ex1.py
    需要先进入文件所在目录

  • 加分习题

1.让你的脚本再多打印一行。

print "\n"

2.让你的脚本只打印一行。

print "Hello World!",
print "Hello Again",
print "I like typing this.",
print "This is fun.",
print 'Yay! Printig.',
print "I'd much rather you 'not'.",
print 'I "said" do not touch this.',

3.在一行的起始位置放一个 ‘ #’ (octothorpe) 符号。
使此行代码无效