摘要:
class Song(object): def __init__(self,lyrics): self.lyrics = lyrics def sing_me_a_song(self): for line in self.lyrics: print(line) happy_bday = Song([ 阅读全文
摘要:
from sys import exit def gold_room(): print("This room is full of gold . How much do you take.") choice = input(">") if "0" in choice or "1" in choice 阅读全文
摘要:
print("""You enter a dark room with two doorsself.Do you go through door #1 or door #2?""") door = input(">") if door == "1": #注意这里是等于一个字符串“1”,不是数字1 p 阅读全文