0
Problem with Random randind
Hey guys, Learning Python is my hobby, and I am working on my own project; simply simulator for DnD players, and i stuck with random and if statement. Could you help me upgrade code, that If race is for example ELF, code pick random age from 100;400 not from 18;400 like in the first line?? Age = str(random.randint(18, 400)) if 'Gnome' or 'Human' in Race: print('Age: ' + str(random.randint(18, 100))) elif 'Dwarf' or 'Half-Elf' or 'Half-Orc' in Race: print('Age: ' + str(random.randint(50, 150))) elif 'Dragonborn' or 'Elf' or 'Halfing' or 'Tiefling' in Race: print('Age: ' + str(random.randint(100, 400))) If you want help me please leave your comment or you can find me on discord: Gilbert#2777
3 ответов
+ 1
You only problem 😂😂😂😂
0
fix elif, as an example:
elif 'x' in s or 'y' in s or 'v' in s:
do smthg
and where is <<Race>> variable?