+ 1
I am making special dice and don't know how to make each random number say something when it happens
I am making special dice and don't know how to make each random number say something when it happens. Here is my code so far: import random for i in range(10): value=random.randint(1,8) if value==1: print("threat") if value==2: print("failure")
2 ответов
+ 3
you need to use if-else statement
if A:
a
elif B:
b
elif C:
c
0
or dictionary.
dic={1:"threat",2:"failure"...}
print(dic[value])