- 博客(8)
- 收藏
- 关注
转载 习题 16: 读写文件
from sys import argvscript,filename = argvprint "We're going to erase %r."% filenameprint "If you don't want that,hit CTRL-C (^C)."print "If you want that,hit RETURN."raw_input("?")print ...
2016-08-28 19:26:00 184
转载 ex3-数字和数字计算
代码:print("I will now count my chickens:")print("hens", 25+30/6)print("Roosters", 100-25*3%4)print("I will count the eggs:")print(3+2+1-5+4%2-1/4+6)print("Is it true 3+2<5-7?")print(3+2<...
2016-08-28 01:13:00 185
转载 ex2-注释和井号
代码:print("I could have code like this.") # and the commnt after is ignored.# You can also use a comment to "disable" or comment a piece of code:# print("This won't run.")print("This will run.")...
2016-08-28 01:11:00 100
转载 ex1-第一个程序 ”helloworld”
代码:print("Hello world.")print("Hello again.")print("I like typing this.")print("This is fun.")print('Yay! Printing.') # 单引号跟双引号的效果一样的~print("I'd rather you 'not'.")print('I said:"do not touch...
2016-08-28 01:07:00 97
转载 第一篇博客 用笨办法学python-14 提示和传递
# 代码如下:usr_name = input("")script = input("")prompt = '> 'print("hi %s,i'm the %s script."% (usr_name,script))print("i'd like to ask u some questions.")print("do u like me %s ?"% usr_name )l...
2016-08-27 21:34:00 88
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人