python小白 猜生肖及验证小游戏
本帖最后由 akon007 于 2020-3-10 13:13 编辑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:")
生肖 = ,ox,tiger,rabbit,dragon,snake,horse,sheep,monkey,chicken,dog,pig]
a = 0
b = 0
c = 0
d = 0
print("请在对应的图片下方输入'有'或者'没有'")
A = ,tiger,dragon,horse,monkey,dog]
print(A)
X = input("有没有?:-")
if X =="没有":
a = 0
if X =="有":
a = 1
B = ,tiger,snake,horse,chicken,dog]
print(B)
Y = input("有没有?:-")
if Y =="没有":
b = 0
if Y =="有":
b = 2
C = ,dragon,snake,horse,pig]
print(C)
Z = input("有没有?:-")
if Z =="没有":
c = 0
if Z =="有":
c = 4
D = ,monkey,chicken,dog,pig]
print(D)
V = input("有没有?:-")
if V =="没有":
d = 0
if V =="有":
d = 8
print("您的生肖是:",生肖1])
print("---- 是否检验一下------")
u = 0
yob = int(input("请输入您的出生年份:"))
chinese_zodiac =,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' haichao 发表于 2020-3-10 15:45
刚开始学,很小白哈
需要先安装emoji 具体安装以pycharm 为例
file -----> setting ----->project interpreter ----->右边的+号-----》输入emoji -----》install package 不错啊,这思路 ee789852 发表于 2020-3-10 10:51
不错啊,这思路
谢谢肯定和支持:handshake 真的不错哦 真的、真的不错 不错不错{:1_893:} 看样子不错,感谢楼主 这个逻辑思路可以啊牛逼 这些emoji还挺好玩的,去试试hh
页:
[1]
2