随笔分类 - Martyr2's Mega Project Ideas List!
自己尝试Martyr2's Mega Project Ideas List罗列出的所有项目
摘要:题目要求: Notepad style application that can open, edit, and save text documents. Add syntax highlighting and other features. 下面的代码实现了部分第一行题目要求 没有实现第二行题目要
阅读全文
摘要:题目要求: read these strings in from a text file and generate a summary. import os def count_words(file): try: f = open(file, 'r', encoding='UTF-8') excep
阅读全文
摘要:class practiceYln(): def __init__(self): self.text1 = None self.text2 = None def cwistr(self): text1 = input("please input a string:") text2 = input("
阅读全文
摘要:class practiceYln(): def __init__(self): # 类参数的初始化 self.text = None def checkifpalindrome(self): self.text = input('please input a word:') # input用来接收
阅读全文
摘要:class PracticeYln(): def __init__(self, text): self.text = text # 不能写 = None, 注释必须举例语句一个空格以上,并且井号后面也有空格! def countvowels(self, text): aa = list(self.t
阅读全文
摘要:class practiceYln(): def __init__(self): self.text = None def piglatin(self, text): if text[0] in ['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U']:
阅读全文
摘要:1 class practiceYln(): #创建一个名叫practiceYln的类 2 def __init__(self, string): #有参构造函数 3 self.string = string 4 def reversedtext(self, string): 5 str(self.
阅读全文