设计一个随机点菜程序代码,要包括50道菜。
时间: 2023-03-07 14:01:24 浏览: 351
JS点餐神器随机点菜代码
答:import randomMenu_list = ["菜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","菜1","菜2","菜3","菜4","菜5","菜6","菜7","菜8","菜9","菜10","菜11","菜12","菜13","菜14","菜15","菜16","菜17","菜18","菜19","菜20","菜21","菜22","菜23","菜24","菜25","菜26","菜27","菜28","菜29","菜30","菜31","菜32","菜33","菜34","菜35","菜36","菜37","菜38","菜39","菜40","菜41","菜42","菜43","菜44","菜45","菜46","菜47","菜48","菜49","菜50"]def random_order():
order = random.sample(Menu_list,50)
print("您的订单为:")
for i in range(50):
print(order[i])random_order()
阅读全文