限行车牌
本帖最后由 hveagle 于 2022-10-23 12:38 编辑import time
endnumber = (('1', '6'), ('2', '7'), ('3', '8'), ('4', '9'), ('5', '0'), \
('1', '2', '3', '4', '5', '6', '7', '8', '9', '0'), \
('1', '2', '3', '4', '5', '6', '7', '8', '9', '0'))
end = input('请输入你的车牌号码:')[-1]
week = time.localtime()
s = print('今日你可通行') if end in endnumber else print('今日你不可通行') 本帖最后由 jackz007 于 2022-10-23 12:21 编辑
import time
carnumber = input('请输入你的车牌号码 : ')
for k in carnumber[::-1]:
if k . isdigit():
break
d = int(k) % 5 if int(k) % 5 else 5
print('您限行周%d' % d)
print('今天您限行') if d == (time . localtime()) else print('今天您不限行')
页:
[1]