猫史档案馆


【Python作品分享】节日【作业帖】

用户:决战决战查看:0 回复:3 评论:0 创建时间:2020-06-04T21:31:51


【作品展示】

center_image

 

【作品介绍】

哦噢

 

【作品源代码】

# '''
#  if 条件1:
#      条件1满足执行的代码
#      ……
#  elif 条件2:
#      件2满足时,执行的代码条
#      ……
#  elif 条件3:
#      件3满足时,执行的代码条
#      ……
#  else:
#      以上条件都不满足时,执行的代码
#
#
# if 条件1 and 条件2:
#      满足条件1 并且 满足条件2,执行的代码
#      ……
#
# '''

holiday_name = input('输入节日:')

if (holiday_name == '情人节'):
    print('买鲜花')
    print('看电影')
    print('http://www.yuluju.com/aiqingyulu/11570.html')
    print('复制链接教你表白')

if (holiday_name == '生日'):
    print('买蛋糕')
    print('https://haokan.喵/v?vid=17949546792538695554&pd=bjh&fr=bjhauthor&type=video')
    print('复制链接教你做蛋糕')

if (holiday_name == '中秋节'):
    print('吃月饼')
    print('家人团聚望月')
    print('https://www.videoc.cn/pages/19110117')
    print('复制链接图片大全')

try:
    print('每天都是节日')
    print('https://baike.喵/item/中国传统节日/396100?fr=aladdin')
    print('复制链接叫你有什么节日')
except :
    pass

 

【提示】

部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:

https://python.codemao.cn


回复

上一页1 页 / 共 1下一页
我是只个萌新我是只个萌新

emotion_编程猫_加油

点赞0


评论


我是只个萌新我是只个萌新

                               

点赞0


评论


LYX_AWLYX_AW

  

点赞0


评论