print("今有物不知其数,三三数之剩二,五五数之剩三,七七数之剩二,问几何?\n")
number = int(input("请输入您认为符合条件的数:"))
if number %3 == 2 and number %5 == 3 and number %7 == 2:
print(number,"符合条件:三三数之剩二,五五数之剩三,七七数之剩二")
print("今有物不知其数,三三数之剩二,五五数之剩三,七七数之剩二,问几何?\n")
number = int(input("请输入瑛姑给出的数:"))
if number %3 == 2 and number %5 == 3 and number %7 == 2:
print(number,"符合条件")
else:
print(number,"不符合条件")
print("在古希腊神话中,玫瑰集爱情与美丽于一身,所以人们常用玫瑰来表达爱情。")
print("但是不同朵数的玫瑰花代表的含义是不同的。\n")
number = int(input("请输入您想送几朵玫瑰花,小默会告诉您含义:"))
if number == 1:
print("1朵:你是我的唯一!")
elif number == 3:
print("3朵:I Love You!")
elif number == 10:
print("10朵:十全十美!")
elif number == 99:
print("99朵:天长地久!")
elif number == 108:
print("108朵:求婚!")
else:
print("小默也不知道了!可以考虑送1朵、3朵、10朵、99朵或108朵哟!")
print("\n为了您和他人的安全,严禁酒后开车!\n")
proof = int(input("请输入每100毫升血液的酒精含量:"))
if proof < 20:
print("\n您还不构成饮酒行为,可以开车,但要注意安全!")
else:
if 80 > proof >= 20:
print("\n已经达到酒后驾驶标准,请不要开车!")
else:
print("\n已经达到醉酒驾驶标准,千万不要开车!")
print("今有物不知其数,三三数之剩二,五五数之剩三,七七数之剩二,问几何?\n")
none = True
number = 0
while none:
number +=1
if number %3 == 2 and number %5 == 3 and number %7 == 2:
print("答曰:这个数是",number)
none = False
print("今有物不知其数,三三数之剩二,五五数之剩三,七七数之剩二,问几何?\n")
for number in range(100):
if number %3 == 2 and number %5 == 3 and number %7 == 2:
print("答曰:这个数是",number)
for i in range(1,10):
for j in range(1,i+1):
print(str(j) + "x"+ str(i) + "=" + str(i*j) + "\t",end='')
print('')
for i in range(1,10):
for j in range(i,10):
print(str(i) + "x"+ str(j) + "=" + str((i)*(j)) + "\t",end='')
print('')
print("今有物不知其数,三三数之剩二,五五数之剩三,七七数之剩二,问几何?\n")
for number in range(100):
if number %3 == 2 and number %5 == 3 and number %7 == 2:
print("答曰:这个数是",number)
break
total = 99
for number in range(1,100):
if number %7 == 0:
continue
else:
string = str(number)
if string.endswith('7'):
continue
total -= 1
print("从1数到99共拍腿",total,"次。")
print('''查寻能量请输入能量来源!退出程序请输入0
能量来源如下:
生活缴费、行走捐、共享单车、线下支付、网络购票''')
ly=input()
if ly=="生活缴费":
print("500g")
elif ly=="行走捐":
print("200g")
elif ly=="共享单车":
print("600g")
elif ly=="线下支付":
print("800g")
elif ly=="网络购票":
print("900g")
elif ly == "0":
print("已退出")
print("----------猜数字游戏----------")
sz=int(input("请输入1~10之间的任意一个数:\n"))
number = 9
while sz != number and sz != -1:
if sz < number:
print("太小,请重新输入:")
sz = int(input())
else:
print("太大,请重新输入:")
sz = int(input())
if sz == number:
print("恭喜你,你赢了,猜中的数字是:",sz)
if sz == -1:
print("----------游戏结束----------")
print("欢迎回来,请开始游戏·······")
print("请输入(中心、音乐块、微信支付块):")
n1 = '中心'
n2 = '音乐块'
n3 = '微信支付块'
none = True
while none:
jfk = str(input("请输入:"))
if jfk == n1:
print("您的分数为:",30)
elif jfk == n2:
print("您的分数为:",32)
elif jfk == n3:
print("您的分数为:",42)
print('''----------10086查询功能----------
输入1,查询当前余额
输入2,查询当前剩余流量
输入3,查询1当前剩余通话
输入0,退出自助查询系统!''')
none = True
while none:
number = int(input(""))
if number == 1:
print("当前余额为:999元")
elif number == 2:
print("当前剩余流量为:5G")
elif number == 3:
print("当前剩余通话为189分钟")
elif number == 0:
print("退出自助查询系统!")
break
标签:语句,sz,elif,第三章,流程,number,剩二,print,input From: https://www.cnblogs.com/ccy1103/p/16704503.html