摘要:
import random class Coin: def __init__(self, rare=False, clean=True, **kwargs): for key,value in kwargs.items(): setattr(self,key,value) self.is_rare = rare ... 阅读全文
摘要:
# get sentence from user original = input('Please enter the sentence you want to translate: ').strip().lower() # split sentence to words words = original.split() # loop through words and translate to... 阅读全文
摘要:
from random import choice questions = ['Why is the sky blue? ', 'Why do cats have 4 legs? ', 'Why is the summer hot? '] question = choice(questions) answer = input(questi... 阅读全文
摘要:
known_user = ['Alice', 'Betty', 'Charlie', 'Daniel', 'Edison'] while True: print('Hi, I am a ridiculous user system') name = input('Please enter your name: ').strip().capitalize() if nam... 阅读全文