Record#
- Today there is no new knowledge to learn, only programming practice.
- Write a dictionary for MokéBeast with input and print functions. When printing, output text in corresponding colors based on the pet's attributes.
- Still not proficient in alignment, need more practice.
CODE#
print("👾 MokéBeast - The Non-Copyright Generic Beast Battle Game 👾")
print()
def color(c):
if c == "fire":
print("\033[31m")
if c == "water":
print("\033[34m")
if c == "electricity":
print("\033[33m")
if c == "grass":
print("\033[32m")
if c == "poison":
print("\033[35m")
moke = {"name":None, "type":None, "move":None, "HP":None, "MP":None, }
for name in moke.keys():
moke[name]=input(f"Input your beast's {name} > ")
for name,value in moke.items():
color(moke['move'])
print(f"{name: <15}:{value}")