python习题1

1 print("Hello World!")
2 print("Hello again")
3 print("I like typing this.")
4 print("This is fun.")
5 print('Yay!Printing.')
6 print("I'd much rather you 'not'.")
7 print('I "said" do not touch this.')

练习ex1.py

巩固练习

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

1 print("Hello World!")
2 print("Hello again")
3 print("I like typing this.")
4 print("This is fun.")
5 print('Yay!Printing.')
6 print("I'd much rather you 'not'.")
7 print('I "said" do not touch this.')
8 print("那就让我的脚本再多打印一行")

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

在行首添加#,就不打印了

3.在一行的起始位置放一个“#”字符,它的作用是什么,自己研究一下。

注释掉本行,临时禁用本行代码。

posted @ 2018-11-15 15:29  yuriya  阅读(332)  评论(0)    收藏  举报