So user should choose between A, B or C and it should put that value into the random int
Error message: ValueError: invalid literal for int() with base 10: 'A'
option=input()
A=a=100
B=b=150
C=c=200
value=random.randint(0,int(option))
print(value)
So user should choose between A, B or C and it should put that value into the random int
Error message: ValueError: invalid literal for int() with base 10: 'A'
option=input()
A=a=100
B=b=150
C=c=200
value=random.randint(0,int(option))
print(value)
Your input 'A' and try to parse it as an int with int(option) this can't work, you need the translation part form the letter to the value, a dict could be a good solution
choices = {'a': 100, 'b': 150, 'c': 200}
option = input("Choose in " + ",".join(map(str, choices.items()))) # Choose in ('a', 100),('b', 150),('c', 200)
value = random.randint(0, choices[option.lower()])
print(value)