Ответ:
import random
stats = []
attributes = 5
print('Stats: ', end='')
for i in range(attributes):
r = random.randint(40, 70)
stats.append(r)
print(stats[i], end=' ')
print('\n\t[1] - Strength\
\n\t[2] - Dexterity\
\n\t[3] - Intelligence\
\n\t[4] - Wisdom\
\n\t[5] - Charisma')
select = int(input('Select: '))
select -= 1
stats[select] = stats[select] + random.randint(5, 10)
for i in range(len(stats)):
if i == select:
continue
stats[i] = stats[i] - random.randint(5, 10)
print('Stats: ', end='')
for i in range(attributes):
print(stats[i], end=' ')
fireball = [12, 15, 28, 10,5]
lightning = [7, 13, 15, 30, 10]
fire_Ward = [20, 23, 14, 6, 17]
while True:
player_slills=input('\n\tКакой силы применить? \
\n\t[f] - fireball\
\n\t[l] - lightning\
\n\t[s] - silence\
\n\t[w] - fire ward\n')
if player_slills=="f":
for i in range(5):
if stats[i] - fireball[i]>=0:
print()
else:
print ("Невозможно применить скилл!Нехватает статов")
break
if stats[i] - fireball[i]>=0:
for i in range(5):
stats[i] - fireball[i]
Объяснение: