![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python exercise
bonnie42706989
这个作者很懒,什么都没留下…
展开
-
PY4E Chapter6 Exercise
**py4e chapter6 exercise3 Assignment Encapsulate this code in a function named count, and generalize it so that it accepts the string and the letter as arguments.** word = input('Please input a word...原创 2019-01-26 23:03:54 · 325 阅读 · 0 评论 -
PY4E Chapter7 Exercise
Exercise 1 Write a program to read through a file and print the contents of the file (line by line) all in upper case. Executing the program will look as follows: python shout.py Enter a file name: m...原创 2019-01-27 23:19:22 · 1096 阅读 · 0 评论 -
PY4E Chapter8 Exercise
exercise4 Enter file: romeo.txt [‘Arise’, ‘But’, ‘It’, ‘Juliet’, ‘Who’, ‘already’, ‘and’, ‘breaks’, ‘east’, ‘envious’, ‘fair’, ‘grief’, ‘is’, ‘kill’, ‘light’, ‘moon’, ‘pale’, ‘sick’, ‘soft’, ‘sun’, ‘...原创 2019-01-28 23:10:47 · 969 阅读 · 0 评论 -
PY4E Chapter9 Exercise
Exercise 2: Write a program that categorizes each mail message by which day of the week the commit was done. To do this look for lines that start with “From”, then look for the third word and keep a r...原创 2019-02-11 15:51:44 · 1013 阅读 · 0 评论 -
PY4E Chapter10 Exercise
PY4E Chapter10 Exercise 1: Revise a previous program as follows: Read and parse the “From” lines and pull out the addresses from the line. Count the number of messages from each person using a diction...原创 2019-03-24 14:13:14 · 1017 阅读 · 0 评论