import datetime
mot = ["今天星期一:\n坚持下去不是因为我很坚强,而是因为我别无选择。",
"今天星期二:\n含泪播种的人一定能笑着收获。",
"今天星期三:\n做对的事情比把事情做对重要。",
"今天星期四:\n命运给予我们的不是失望之酒,而是机会之杯。",
"今天星期五:\n不用等到明天,明天太遥远,今天就行动。",
"今天星期六:\n求知若饥,虚心若愚。",
"今天星期天:\n成功将属于那些从不说“不可能”的人。"]
day = datetime.datetime.now().weekday()
print(mot[day])
print("2017~2018赛季NBA西部联盟前八名\n")
team = ["火箭","勇士","开挫者","雷霆","爵士","鹈鹕","马刺","森林狼"]
for index,item in enumerate(team):
if index%2 == 0:
print(item +"\t\t", end="")
else:
print(item + "\n")
# NBA名人堂原有人员
oldlist = ["迈克尔·乔丹","卡里姆·阿布杜尔·贾巴尔","哈齐姆·奥拉朱旺","查尔斯·巴克利","姚明"]
newlist = ["贾森·基德","史蒂夫·纳什","格兰特·希尔"]
oldlist.extend(newlist)
print(oldlist)
str1 = "千山鸟飞绝"
str2 = "万径人踪灭"
str3 = "孤舟蓑笠翁"
str4 = "独钓寒江雪"
verse = [list(str1),list(str2),list(str3),list(str4)]
print("\n-- 横版 --\n")
for i in range(4):
for j in range(5):
if j == 4:
print(verse[i][j])
else:
print(verse[i][j],end="")
verse.reverse()
print("\n-- 竖版 --\n")
for i in range(5):
for j in range(4):
if j == 3:
print(verse[j][i])
else:
print(verse[j][i],end="")
coffeename = ('蓝山','卡布奇诺','曼特宁','摩卡','麋香猫','哥伦比亚')
print(coffeename)
coffeename = ('蓝山','卡布奇诺','曼特宁','摩卡','麋香猫','哥伦比亚')
print("您好,欢迎光临~ 伊米咖啡馆~ \n\n我店有: \n")
for name in coffeename:
print(name + "咖啡",end= "")
coffeename = ('蓝山','卡布奇诺','曼特宁','摩卡','麋香猫','哥伦比亚')
coffeename[4] = '拿铁'
print(coffeename)
print("2017~2018赛季NBA西部联盟前八名\n")
team = ("火箭","勇士","开挫者","擂台","爵士","鹈鹕","马刺","森林狼")
for index,item in enumerate(team):
if index%2 == 0:
print(item +"\t\t",end= "")
else:
print(item + "\n")
name = ['绮梦','冷伊一','香凝','黛兰']
sign = ['水瓶座','射手座','双鱼座','双子座']
dictionary = dict(zip(name,sign))
print(dictionary)
name = ['绮梦','冷伊一','香凝','黛兰']
sign_person = ['水瓶座','射手座','双鱼座','双子座']
person_dict = dict(zip(name,sign_person))
sign_all = ['白羊座‘,’金牛座','双子座','巨蟹座','狮子座','处女座','天枰座',
'天蝎座','射手座','魔蝎座','水瓶座','双鱼座']
nature = ['有一种让人看见就觉得很开心的感觉,阳光、乐观、坚强,性格直来直去,就是有点小脾气。',
'很保守,喜欢稳定,一旦有什么变动就会觉得心里不踏实,性格比较慢热,是个理财高手。',
'情绪容易敏感,有点小聪明,耐心不够,因你的可爱性格会让很多人喜欢和你做朋友。',
'有着远大理想,总想靠自己的努力成为人上人,总是期待被仰慕被期待的感觉。',
'坚持追求自己的完美主义者。',
'追求平等、和谐,交际能力强,因此朋友较多。最大的缺点就是面对选择总是犹豫不决。',
'精力旺盛,占有欲强,对于生活很有目标,不达目的誓不罢休,复仇心强。',
'崇尚自由,勇敢、果断、独立,身上有一股勇往直前的劲儿,只要想做,就能做。',
'是最有耐心的,做事最小心。做事脚踏实地,比较固执,不达目的誓不罢休,而且非常勤奋。',
'人很聪明,最大的特点是创新,追求独一无二的生活,个人色彩很浓重的星座。',
'集所有星座的优缺点于一身。最大的优点是有一颗善良的心,愿意帮助别人。']
sign_dict = dict(zip(sign_all,nature))
print("【香凝】的星座是",person_dict.get("香凝"))
print("\n 她的性格特点是;\n\n",sign_dict.get(person_dict.get("香凝")))
name = ['绮梦','冷伊一','香凝','黛兰']
sign = ['水瓶','射手','双鱼','双子']
dictionary = {i:j+'座' for i,j in zip(name,sign)}
print(dictionary)
python = {'绮梦','冷伊一','香凝','梓轩'}
c = {'冷伊一','零语','梓轩','圣博'}
print('选择python语言的学生有:',python,'\n')
print('选择c语言的学生有:',c)
hero1 = ["苏烈", "刘邦" ,"钟馗", "张飞" ,"牛魔", "程咬金" ,"白起", "刘禅", "庄周", "项羽", "廉颇", "巨灵神" ,"安禄山", "猪八戒"]
hero2 = ["狂铁" ,"被擒虎" ,"凯" ,"孙悟空" ,"哪吒", "杨戬", "橘右京", "亚瑟", "雅典娜" ,"夏侯惇" ,"关羽", "吕布",
"韩信" ,"老夫子", "达摩" ,"典韦", "曹操", "钟无艳", "墨子", "超云", "刑天" ,"龙且"]
hero3 = ["百里玄策", "庞统" ,"花木兰", "阿珂" ,"不知火舞" ,"李白" ,"娜可露露", "兰陵王" ,"露娜"
"韩信", "宫本武藏" ,"盖聂" "红拂"]
hero4 = ["杨玉环", "奕星" ,"女娲", "周瑜" ,"鬼谷子", "芈月", "干将莫邪" ,"东皇太一" ,"大乔", "诸葛亮", "貂蝉", "张良"
"安琪拉", "不知火舞" ,"姜子牙" ,"武则天", "王昭君", "甄姬", "扁鹊", "高渐离", "嬴政", "妲己" ,"小乔"]
hero5 = ["百里守约", "后裔" ,"刘备", "黄忠", "马可波罗", "成吉思汗", "虞姬", "李元芳" ,"艾琳", "狄仁杰", "鲁班七号" ,"孙尚香"]
hero6 = ["明世隐" ,"梦琪", "孙膑", "太乙真人" ,"蔡文姬"]
hero = [hero1,hero2,hero3,hero4,hero5,hero6]
role = ["====坦克:====","====战士:====","====刺客:====","====法师:====","====射手:====","====辅助:===="]
print("“王者荣耀”游戏角色\n")
none = True
b = 0
for name in role:
print(name)
while none:
print(hero[b])
break
while none:
b=b+1
break
system = ["车次","出发站-到达站","出发时间","到达时间","历时"]
train = ["T40","T298","Z158","Z26"]
depart = ["长春-北京","长春-北京","长春-北京","长春-北京"]
departure = ["00:12","00:06","12:48","21:58"]
arrival = ["12:20","10:50","21:06","06:08"]
last = ["12:08","10:44","08:18","8:20"]
print(system[0],system[1],system[2],system[3])
print(train[0],depart[0],departure[0],arrival[0],last[0])
print(train[1],depart[0],departure[1],arrival[1],last[1])
print(train[2],depart[0],departure[2],arrival[2],last[2])
print(train[3],depart[0],departure[3],arrival[3],last[3])
a = input("请输入要购买的车次:")
b = input("请输入乘车人(用逗号分隔):")
if a == train[0]:
c = depart[0]
departur = departure[0]
if a == train[1]:
c = depart[0]
departur = departure[1]
if a == train[2]:
c = depart[0]
departur = departure[2]
if a == train[3]:
c = depart[0]
departur = departure[3]
else:
print("无此趟车次")
print("您已购"+ a +"次列车" "开,请"+ b +"准时乘车")
标签:depart,name,555,departure,sign,train,print From: https://www.cnblogs.com/6666j/p/16786438.html