defgetCoffee(smallChange,type):menu={'Americano':2.20,'Latte':2.30,'Flat white':2.40,'Filter':3.50}ifsum(smallChange)==menu[type]:return"Here is your %s, have a nice day!"%(type)else:return"Sorry, exact change only, try again tomorrow!"
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Python