题解 | #菜品的价格#
菜品的价格
https://www.nowcoder.com/practice/86843c3ba8f240cda3bb2b177f896735
import sys a={ 'pizza':10, 'rice':2, 'yogurt':5, 'other':8 } b=input() if b in a.keys(): print(a.get(b)) else: print("8")
菜品的价格
https://www.nowcoder.com/practice/86843c3ba8f240cda3bb2b177f896735
import sys a={ 'pizza':10, 'rice':2, 'yogurt':5, 'other':8 } b=input() if b in a.keys(): print(a.get(b)) else: print("8")
相关推荐