Clay is playing darts. his dartboard contains ten equal-sized zones with point values from 1 to 10. write code that simulates his total score after 1000 dart tosses. make sure to use a for loop.
Question
Answer:
Instead of a real language, I'll use pseudo code here: var TOTAL_SCORE = 0
for(var x; i<1000; i++) {
var SCORE rand.random_integer[from 1-10];
var TOTAL SCORE = TOTAL_SCORE + SCORE;
}
print(TOTAL_SCORE);
solved
general
10 months ago
7283