+ 1
I am trying to make a dice and I want to make it so when a certain number is rolled It will add 1 to a variable. How would I do this?
This is what I tried and it did bot work y=0 z=0 def d6(x): import random for i in range(x): value=random.randint(1,6) if value==1: y+=1 if value==2: z+= d6(1)
3 Antworten
+ 1
list =[1,2,3,4,5,6]
rolled_no = random.choice(list)
print (rolled_no+1)
Sorry if i got ur question wrong😐
0
I am actually just trying to add 1 to a variable, not print it and I want when I roll a 4 for example it add 1 to a variable like x
Thanks for answering though
0
what does (spam* eggs)=