0
Won't print last part of my character generator? (Python)
I'm not very good at programming in general, but some time ago I started working on a random character generator that I'm constantly updating. Today I decided to add an Enneagram part to my program, but for some reason it just refuses to print it! I tried many things and did many tests with "print(enneagram)" in parts of the last bit of code and the results are just a mess. Help? This is the link of the program: https://code.sololearn.com/c8buG67aYa10
1 ответ
+ 2
Kath Gray , short answer to your issue: you mixed up different data formats:
...
personalidades2 = ['1', '2', '3', '4', '5', '6', '7', '8', '9'] # <<<--- this is string
enneagram = 0
if personalidade == 1:
enneagram = random.choices(personalidades2, weights = (14, 0, 3, 6, 62, 5, 1, 6, 3))
if personalidade == 2:
……
if enneagram == 1: # and you are comparing here with integer numbers
print(
"""Enneagram 1 - The Reformer
...