Computers and Technology

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.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 06:00, Treezy11
In outlook how can cherie look at the details of an event that appears on the month view of her calendar? check all that apply. by switching to the detail view by switching to the week view by switching to the day view by right-clicking on the event by double-clicking on the event by highlighting the event
Answers: 2
image
Computers and Technology, 22.06.2019 19:20, mayaparness
Write a program that prompts the user to input a string. the program then uses the function substr to remove all the vowels from the string. for example, if str = "there", then after removing all the vowels, str = "thr". after removing all the vowels, output the string. your program must contain a function to remove all the vowels and a function to determine whether a character is a vowel.
Answers: 2
image
Computers and Technology, 23.06.2019 00:00, brooklyn4932
What engine component is shown in the above figure?
Answers: 1
image
Computers and Technology, 23.06.2019 14:30, bernicewhite156
Select the correct answer. what does it indicate when a website displays https instead of http? a. the website is secure. b. there is no secure sockets layer. c. the secure sockets layer is hidden. d. the website is not secure.
Answers: 1
Do you know the correct answer?
In the game dungeons & dragons, each player plays the role of a fantasy character.
a pla...

Questions in other subjects:

Konu
Mathematics, 28.01.2021 19:00
Konu
Chemistry, 28.01.2021 19:00
Konu
Mathematics, 28.01.2021 19:00
Konu
Mathematics, 28.01.2021 19:00
Konu
Mathematics, 28.01.2021 19:00