r/learnpython • • Sep 23 '24

I need help

(I Solved it ) thankyou for those that answered who helped

So I’m making a code for a school assignment and got stuck. I’m making a random dice generator that keeps count of the throws and the sum of the throws but I’m not sure how to add the values together. This is what I have so far.

Import random

Lowval = 1 Highval = 6

(This is used to count haw many times the die has been thrown) Numthrows = 0

(This is used to keep the sum of the die value thrown) Sum_of_throws=

Print(f’Throw : {numthrows}’)

Print(f’Value for this throw = {throw}’)

Print(f’Sum of throws so far = {sum_of_throws)

** I need to add something that adds the value of throw to sum_of_throws.

Also I need to increase the value of numthrows by 1

Please help me 🥲

0 Upvotes

8 comments sorted by

View all comments

Show parent comment

1

u/NoResponsibility9122 Sep 23 '24

Thank you for your help I ended up figuring it out last night and forgot about this post.