Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5
I'm not sure I understand what you want to achieve by "random roll + stat = roll" What did you expect the stats be? numbers? string? if you want numbers then use int(input(...)) because input() function returns a string and if you want to, later, you can't easily do straight calculation with string. And can you elaborate more about your plan with those stats? why you need to keep track of them? as for keeping the values, you can use a list for storage. s = int(input("Enter Strenght stat")) print("." + s + ".") c = int(input("Enter Constitution stat")) print("." + c + ".") d = int(input("Enter Dexterity stat")) print("." + d + ".") w = int(input("Enter Wisdom stat")) print("." + w + ".") i = int(input("Enter Inteligence stat")) print("." + i + ".") ch = int(input("Enter Charisma stat")) print("." + ch + ".") values = [ s , c , d , w , i , ch ] print(values)
14th Feb 2019, 5:21 AM
Ipang