欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

星座计算盘

程序员文章站 2022-06-12 16:02:48
...
m=eval(input('请输入你的生日月份:\n'))
d=eval(input('请输入你的生日日期:\n'))
def star(n):
    print('您的星座是:'+chr(n))
if m==1:
    if d>19&d<32:
        star(9810)
    else:
        star(9809)
elif m==2:
    if d>0&d<19:
        star(9810)
    else:
        star(9811)
elif m==3:
    if d>0&d<21:
        star(9811)
    else:
        star(9812)
elif m==4:
    if d>0&d<21:
        star(9812)
    else:
        star(9801)
elif m==5:
    if d>0&d<21:
        star(9801)
    else:
        star(9802)
elif m==6:
    if d>0&d<22:
        star(9802)
    else:
        star(9803)
elif m==7:
    if d>0&d<22:
        star(9803)
    else:
        star(9804)
elif m==8:
    if d>0&d<23:
        star(9804)
    else:
        star(9805)
elif m==9:
    if d>0&d<23:
        star(9805)
    else:
        star(9806)
elif m==10:
    if d>0&d<23:
        star(9806)
    else:
        star(9807)
elif m==11:
    if d>0&d<22:
        star(9807)
    else:
        star(9808)
else:
    if d>0&d<22:
        star(9808)
    else:
        star(9809)
相关标签: Python