Welcome to the CSC Q&A, where you can get help (and share your knowledge) about computer science!

Exercise 5.7 : diceSum

+3 votes
My method passes two out of the four tests but fails the other two. However, when I check my output it accomplishes the task (roll dice until the sum is what the user wanted). I think it's wrong because Practice it's expected output has different randomly generated numbers than mine but that shouldn't make my method wrong. Anyone also have this problem or know of a fix?
asked Oct 8 in CSC 211 (F17) by Matthew Kuechenberg (1,041 points)

1 Answer

0 votes
I tried the problem and didn't have any issues. I would recommend making sure all your formatting is correct (e.g. correct number of spaces, lines, etc.) and ensuring that you're always generating new random numbers and comparing them correctly each time. Because it's using random numbers, it should be just going off of what the output looks like, not the actual values.
answered Oct 9 by Vecna (3,748 points)
...