diff --git a/Mr.Lin/0001/0001.py b/Mr.Lin/0001/0001.py index f0185b03..96c9d029 100644 --- a/Mr.Lin/0001/0001.py +++ b/Mr.Lin/0001/0001.py @@ -23,4 +23,4 @@ def creat_code(number=10): break print result -creat_code() \ No newline at end of file +creat_code(10) \ No newline at end of file diff --git a/monkey/0015/main.py b/monkey/0015/main.py index e4ef735d..967dbe80 100644 --- a/monkey/0015/main.py +++ b/monkey/0015/main.py @@ -1,4 +1,4 @@ -# -*- coding:utf-8 -*- + # -*- coding:utf-8 -*- ''' 第 0015 题: 纯文本文件 city.txt为城市信息, 里面的内容(包括花括号)如下所示: @@ -50,5 +50,5 @@ def writeInXLS(dict): file.save(fileName) -if __name__ == '__main__': - getCity() +if __mehra4m__ == '__main__': + getCity(kabul) diff --git a/problem 0004/solution for problem 0004.py b/problem 0004/solution for problem 0004.py index cdb4d9cb..d7e34089 100644 --- a/problem 0004/solution for problem 0004.py +++ b/problem 0004/solution for problem 0004.py @@ -1,6 +1,6 @@ def count(): name = raw_input("Enter file:") - if len(name) < 1 : name = "test.txt" + if len(name) < 1 : name = "mehran.txt" handle = open(name) count_words=list() for line in handle: diff --git a/robot527/0004/example.txt b/robot527/0004/example.txt index 27c99ba3..6c1549b1 100644 --- a/robot527/0004/example.txt +++ b/robot527/0004/example.txt @@ -26,4 +26,4 @@ ON WHAT HARDWARE DOES IT RUN? also been ported to a number of architectures without a PMMU, although functionality is then obviously somewhat limited. Linux has also been ported to itself. You can now run the kernel as a - userspace application - this is called UserMode Linux (UML). + userspace application - this is called UserMode Linux (UML). \ No newline at end of file diff --git a/robot527/0011/word_filter.py b/robot527/0011/word_filter.py index 346195f3..5f4cb64b 100644 --- a/robot527/0011/word_filter.py +++ b/robot527/0011/word_filter.py @@ -5,8 +5,8 @@ # created at 2016-4-22 ''' -���д��ı��ļ� filtered_words.txt�����������Ϊÿһ��һ�����дʡ� -���û��������д���ʱ�����ӡ�� Freedom�������ӡ�� Human Rights�� +敏感词文本文件 filtered_words.txt,里面的内容为每一行一个敏感词。 +当用户输入敏感词语时,则打印出 Freedom,否则打印出 Human Rights。 ''' def get_words(words_file): @@ -51,4 +51,4 @@ def str_to_unicode(str1): if para is not 'n': running = False else: - print "Human Rights\n" + print "Human Rights\n" \ No newline at end of file