from emoji import emojize
rat = emojize(":mouse:")
ox = emojize(":cow:")
tiger = emojize(":tiger:")
rabbit = emojize(":rabbit:")
dragon = emojize(":dragon:")
snake = emojize(":snake:")
horse = emojize(":horse:")
sheep = emojize(":goat:")
monkey = emojize(":monkey:")
chicken = emojize(":chicken:")
dog = emojize(":dog:")
pig = emojize(":pig:")
生肖 = [rat,ox,tiger,rabbit,dragon,snake,horse,sheep,monkey,chicken,dog,pig]
a = 0
b = 0
c = 0
d = 0
print("请在对应的图片下方输入'有'或者'没有'")
A = [rat,tiger,dragon,horse,monkey,dog]
print(A)
X = input("有没有?:-")
if X =="没有":
a = 0
if X =="有":
a = 1
B = [ox,tiger,snake,horse,chicken,dog]
print(B)
Y = input("有没有?:-")
if Y =="没有":
b = 0
if Y =="有":
b = 2
C = [rabbit,dragon,snake,horse,pig]
print(C)
Z = input("有没有?:-")
if Z =="没有":
c = 0
if Z =="有":
c = 4
D = [sheep,monkey,chicken,dog,pig]
print(D)
V = input("有没有?:-")
if V =="没有":
d = 0
if V =="有":
d = 8
print("您的生肖是:",生肖[a+b+c+d-1])
print("---- 是否检验一下------")
u = 0
yob = int(input("请输入您的出生年份:"))
chinese_zodiac =[monkey,chicken,dog,pig,rat,ox,tiger,rabbit,dragon,snake,horse,sheep]
u = yob%12
print("您的生肖是:",chinese_zodiac(u))
如何导入emoji???????
RESTART: C:/Users/Administrator/AppData/Local/Programs/Python/Python36-32/mypy01/生肖测试.py
Traceback (most recent call last):
File "C:/Users/Administrator/AppData/Local/Programs/Python/Python36-32/mypy01/生肖测试.py", line 1, in <module>
from emoji import emojize
ModuleNotFoundError: No module named 'emoji'
>>>
RESTART: C:/Users/Administrator/AppData/Local/Programs/Python/Python36-32/mypy01/生肖测试.py
Traceback (most recent call last):
File "C:/Users/Administrator/AppData/Local/Programs/Python/Python36-32/mypy01/生肖测试.py", line 1, in <module>
from emoji import emojize
ModuleNotFoundError: No module named 'emoji'