In [1]:
drinks={
'martini' : {'vodka', 'vermouth'},
'black russian' : {'vodka', 'kahlua'},
'white russian' : {'cream', 'kahlua', 'vodka'},
'manhattan' : {'rye', 'vermouth', 'bitters'},
'screwdriver': {'orange juice', 'vodka'},
'verorange' : {'orange juice', 'vermouth'},
'kahlua milk' : {'kahlua', 'milk'},
'jin tonic' : {'jin', 'tonic water'},
'mojito' : {'rum', 'lime juice'},
'cinderella' : {'orange juice', 'lemon juice','pineapple juice'}
}
In [2]:
inputs = input('what do you want? ')
print('Here are some Recipt:')
for name, contents in drinks.items():
if inputs in contents:
print(name)
In [19]:
morse = {
'.-':'A','-...':'B','-.-.':'C','-..':'D','.':'E','..-.':'F',
'--.':'G','....':'H','..':'I','.---':'J','-.-':'K','.-..':'L',
'--':'M','-.':'N','---':'O','.--.':'P','--.-':'Q','.-.':'R',
'...':'S','-':'T','..-':'U','...-':'V','.--':'W','-..-':'X',
'-.--':'Y','--..':'Z', '':' '
}
In [18]:
code = '.... . ... .-.. . . .--. ... . .- .-. .-.. -.--'
In [20]:
senten = input("What's going on? ")
senten = ".".join(senten)
senten = senten.split('.')
print(senten)
In [21]:
for dot, capi in morse.items():
if capi in senten:
print(dot,end=" ")
print(morse.get(dot), end=" ")