subject

In the game dungeons & dragons, each player plays the role of a fantasy character.
a player performs actions by rolling a 20-sided die, adding a "modifier" number to the roll, and comparing the total to a threshold for success. the modifier depends on her character's competence in performing the action.
for example, suppose alice's character, a barbarian warrior named roga, is trying to knock down a heavy door. she rolls a 20-sided die, adds a modifier of 11 to the result (because her character is good at knocking downdoors), and succeeds if the total is greater than 15.
write code that simulates that procedure. compute three values:
the result of alice's roll(roll_result), the result of her roll plus roga's modifier (modified_result), and a boolean value indicatingwhether the action succeeded (action_succeeded). do not fill in any of the results manually; the entire simulation should happen in code.
hint: a roll of a 20-sided die is a number chosen uniformly from the array make_array(1, 2, 3, 4, 20). so a roll of a 20-sided die plus 11is a number chosen uniformly from that array, plus 11.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 21:30
Im doing this last minute and literally none of my neighbors or people that my dad works with use excel so if anyone could me make up an example
Answers: 1
question
Computers and Technology, 23.06.2019 07:30
What part of the interface displays the external references contained in a selected cell? the status bar the review tab the scroll bar the formula bar
Answers: 1
question
Computers and Technology, 24.06.2019 17:00
Aman travel 200m towards east< br /> from his house then takes left< br /> to turn and moves 200 m north< br /> find the displacement & distance.< br />
Answers: 3
question
Computers and Technology, 25.06.2019 05:00
Brad wants to buy flowers for his friend with 33 dollars.the daisies are 1 dollar each and the roses are 2 dollars each he buy 3 more daisies than roses how much did the roses cost
Answers: 2
You know the right answer?
In the game dungeons & dragons, each player plays the role of a fantasy character.
a pla...
Questions
question
Mathematics, 02.12.2020 09:50
question
Computers and Technology, 02.12.2020 09:50
question
History, 02.12.2020 09:50
question
Mathematics, 02.12.2020 09:50
question
Mathematics, 02.12.2020 09:50
Questions on the website: 13722360