Strings
def cake_maker(word: str) -> str: for l in "cake": if l not in word.lower(): return "Not enough to make the cake!" return "Cake"
- def cake_maker(word: str) -> str:
return 'Cake' if 'cake' == ''.join([i for i in 'cake' if i in word.lower()]) else "Not enough to make the cake!"- for l in "cake":
- if l not in word.lower():
- return "Not enough to make the cake!"
- return "Cake"
import random quotes= ["Captain Teemo on duty.","Yes, sir!", "Armed and ready.","Reporting in.","Hut, two, three, four.","I'll scout ahead!","Swiftly!","That's gotta sting.","Never underestimate the power of the Scout's code.","Size doesn't mean everything."] def motivation(): return random.choice(quotes)
from random import randint- import random
- quotes= ["Captain Teemo on duty.","Yes, sir!", "Armed and ready.","Reporting in.","Hut, two, three, four.","I'll scout ahead!","Swiftly!","That's gotta sting.","Never underestimate the power of the Scout's code.","Size doesn't mean everything."]
- def motivation():
return quotes[randint(0,len(quotes)-1)]- return random.choice(quotes)