摘要:
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. 阅读全文