Python3
文章平均质量分 54
zfy421
这个作者很懒,什么都没留下…
展开
-
Python3 练习题
创建一个程序,程序提示用户在while循环中输入数值,并根据输入的数值逐步构建一个列表。用户结束输入(按Enter键)时,打印出输入的数值本身、输入数值个数、输入数值和、中间值、最小值、最大值及平均值。运行实例:simple counterinput integer:5input integer:55input integer:feinvalid literal for...原创 2013-11-13 10:05:01 · 327 阅读 · 0 评论 -
Python3 练习题2
创建一些词汇列表,比如,冠词(“the”,“a”)、主题(“cat”,“dog”,“man”,“woman”)、动词(“sang”,“run”,“jumped”)、状语(“loudly”,“quietly”,“well”,“badly”)。之后循环5次,每次迭代中,使用random.choice()函数选择冠词主题动词状语,使用random.randint()选择结构:冠词+主题+动词+状语;冠...原创 2013-11-13 11:11:36 · 212 阅读 · 0 评论