import numpy as np breakfast_list = ['古早味', '德合香', '布朗奇早餐', '星巴克', '小貓咪', '傳香飯糰', '米塔', '麥當勞', '摩斯', '7-11', '全家'] lunch_and_dinner_list = ['小公寓', '波波恰恰', '湯饌', '享窩咖啡', '湯包', '殺人魔王', '呷麵騎士', '提洛斯', '蝴蝶漾', '東京小城', '金鰭', '樂山', 'My麵屋', '李氏餐酒館', '里克', '水煎包', '憩賢樓', '高句麗', '魯智深', '敏忠', '大正亭', '阿里郎', '鬼匠', 'Juicy Bun', '滇味廚房'] high_price_list = ['星巴克', '摩斯', '小公寓', '享窩咖啡', '金鰭', '李氏餐酒館', '里克', 'Juicy Bun', '滇味廚房'] snack_list = ['豆花', '政大烤場', '丐幫滷味', '鹹水雞'] 高級 = 0 x = np.random.randint(275) 早餐 = np.array(breakfast_list[(x % 11)]) print('早餐:',早餐) eat1 = 早餐 if np.any(早餐 == high_price_list): 高級 = 1 x = np.random.randint(275) 午餐 = np.array(lunch_and_dinner_list[(x % 25)]) if (高級 == 1): while np.any(午餐 == high_price_list): 午餐 = np.array(lunch_and_dinner_list[(x % 25)]) if np.any(午餐 == high_price_list): 高級 = 2 print('午餐:',午餐) eat = 午餐 x = np.random.randint(275) 晚餐 = np.array(lunch_and_dinner_list[(x % 25)]) if (高級 == 1 or 2): while np.any(晚餐 == high_price_list) or (晚餐 == 午餐): x = np.random.randint(275) 晚餐 = np.array(lunch_and_dinner_list[(x % 25)]) else: while (晚餐 == 午餐): x = np.random.randint(275) 晚餐= np.array(lunch_and_dinner_list[(x % 25)]) if np.any(晚餐 == high_price_list): 高級 = 3 print('晚餐:',晚餐) eat = 晚餐 if 高級 == 1: print('早餐吃了高級貨,不吃消夜') elif 高級 == 2: print('午餐吃了高級貨,不吃消夜') elif 高級 == 3: print('晚餐吃了高級貨,不吃消夜') else: x = np.random.randint(275) 消夜= np.array(snack_list[(x % 4)]) print('消夜:',消夜) eat = 消夜 print(eat)
随机的话不同的时间段
everyday_greet_data = { "breakfast": [ "早上7点啦,吃早餐啦!", "起床啦起床啦!现在还没起床的都是懒狗!", "哦哈哟米娜桑!今日も元気でね!?", "新的一天又是全气满满哦!", "一日之计在于晨,懒狗还不起床?" ], "lunch": [ "中午12点啦,吃午餐啦!", "恰饭啦恰饭啦!再不去食堂就没吃的啦!", "中午还不恰点好的?整点碳水大餐嗯造吧!" ], "snack": [ "下午三点了,饮茶了先!", "摸鱼时刻,整点恰滴先~", "做咩啊做,真给老板打工啊!快来摸鱼!" ], "dinner": [ "下午6点了!不会真有人晚上加班恰外卖吧?", "下班咯,这不开造?", "当务之急是下班!" ], "midnight": [ "晚上10点啦,整个夜宵犒劳自己吧!", "夜宵这不来个外卖?", "夜宵这不整点好的?" ], }赞赏
历史上的文章
- 2020: 配置vscode 远程服务器开发 root用户免密登录( 0)
- 2020: 开启黑域(Brevent)以及其他adb shell的命令( 0)
- 2019: Centos7 最小安装网络配置方法( 0)
- 2019: 在centos系统上,在使用yum命令安装时候报错( 0)
除特别注明外,本站所有文章均为LJY IT BLOG原创,转载请注明出处来自https://www.ljy2345.com/2021/08/python-code-to-calculate-what-to-eat-and-where-to-eat/
Comments | NOTHING