>Project: Python In this project you will create a simple program to roll some dice and calculate damage in the style of Dungeons and Dragons a popular roleplaying game.Project: Python In this project you will create a simple program to roll some dice and calculate damage in the style of Dungeons and Dragons a popular roleplaying game. One of the main components of the game is the dice roll. This allows for randomization and adds variations to the game. Die sides are denoted by d3 d6 d20 etc. with the number referring to the number of sides that the die has. Since we are using a computer we can have a die like d1000 (meaning a 1000-sided die) which would not be possible in real life. We can also roll multiple dice. For example 1d6 means a six-sided die that can output anything from 1 2 3 4 5 or 6. 2d6 means two six-sided dice that can output the sum of two dice throws (e.g. 2 through 12). If the first roll is 3 and the second roll is 2 the sum is 5. Please find the starter code here: https://repl.it/@bus101/Final-project-starter-code Copy the code into your own account. Make sure that you don’t change any of the provided code. You will need “random” to generate random numbers (e.g. the die roll). This function takes an input parameter as a string that looks like “1d3” “3d5” etc. The function should return an integer simulating those dice rolls. In the case of “3d5” for example the function will generate a random number between 1 and 5 three times and return the total as an integer. This function gets the value of damage based on roll strings. If the defense roll is greater than the attack roll damage is 0. Otherwise return attack minus defense as an integer. In this function ask the user how many rolls they want to take. Next ask the user to input the attack dice and the defense dice for roll 1 roll 2 etc. up to the number of rolls they entered. Finally display each roll round and the damage from that round. This function does not need to return anything. Each group of output is from a separate run of the program. The program only needs to run once each time. How many rolls do you want to take? 3 Input attack and defense roll 1: 1d31d3 Input attack and defense roll 2: 1d61d3 Input attack and defense roll 3: 1d61d10 Attack:1d3 Defense:1d3 : Damage: 0 Attack:1d6 Defense:1d3 : Damage: 2 Attack:1d6 Defense:1d10 : Damage: 0 How many rolls do you want to take? 2 Input attack and defense roll 1: 100d5150d3 Input attack and defense roll 2: 99d6100d7 Attack:100d5 Defense:150d3 : Damage: 0 Attack:99d6 Defense:100d7 : Damage: 0 How many rolls do you want to take? 5 Input attack and defense roll 1: 500d5500d5 Input attack and defense roll 2: 600d6600d6 Input attack and defense roll 3: 123d456123d123 Input attack and defense roll 4: 1d100000001d100000000000 Input attack and defense roll 5: 1d11d1 Attack:500d5 Defense:500d5 : Damage: 0 Attack:600d6 Defense:600d6 : Damage: 0 Attack:123d456 Defense:123d123 : Damage: 20058 Attack:1d10000000 Defense:1d100000000000 : Damage: 0 Attack:1d1 Defense:1d1 : Damage: 0 If you do not see a “Share” button in the top right please turn off any ad blockers. When you are done with your code click “Share” in the top right. You will see an info box pop up like the screenshot below. At the bottom of the box click “Copy repl link”. Please do not use the “Invite someone with a join link” feature. Create a new text submission in iLearn. Paste your link into the text box (not the comments box) and submit. Note: if you change the title of your repl after submitting your link will no longer be valid. You will need to create a new link (see steps above) and submit again. I recommend making the title of your repl something simple like “[first name] [last name] Project” and leaving it like that. You will need to learn additional Python concepts on your own. I will provide updated resources here that will help. Here’s how to use these resources: https://www.loom.com/share/f46abf6088ca48b2967e39c454ec4022 Functions (Dr. Chuck): https://www.youtube.com/watch?v=5Kzw-0-DQAk https://www.youtube.com/watch?v=AJVNYRqn8kM Lists (Dr. Chuck): https://www.youtube.com/watch?v=ljExWqnWQvo https://www.youtube.com/watch?v=bV1FQUBIApM https://www.youtube.com/watch?v=GxADdpo6EP4 Using the split() function: https://www.w3schools.com/python/ref_string_split.asp (Hint: if the roll string is “1d5” what separator should you use to split the string into the number of dice and number of sides?) randint() function: https://www.w3schools.com/python/ref_random_randint.asp The following textbooks are for reference only. You don’t need to read them all the way through. Python for Everybody (Dr. Chuck’s book): http://do1.dr-chuck.com/pythonlearn/EN_us/pythonlearn.pdf Think Python: http://greenteapress.com/thinkpython2/thinkpython2.pdf New material Dec 5 This is another good instructor Functions: https://www.youtube.com/watch?v=NSbOtYzIQI0 Lists: https://www.youtube.com/watch?v=tw7ror9x32s For loops: https://www.youtube.com/watch?v=OnDr4J2UXSA While loops: https://www.youtube.com/watch?v=6TEGxJXLAWQ Dictionaries: https://www.youtube.com/watch?v=ZEZdys-fHDw

Order a unique copy of this paper
(550 words)

Approximate price: $22

Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

We value our customers and so we ensure that what we do is 100% original..
With us you are guaranteed of quality work done by our qualified experts.Your information and everything that you do with us is kept completely confidential.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

The Product ordered is guaranteed to be original. Orders are checked by the most advanced anti-plagiarism software in the market to assure that the Product is 100% original. The Company has a zero tolerance policy for plagiarism.

Read more

Free-revision policy

The Free Revision policy is a courtesy service that the Company provides to help ensure Customer’s total satisfaction with the completed Order. To receive free revision the Company requires that the Customer provide the request within fourteen (14) days from the first completion date and within a period of thirty (30) days for dissertations.

Read more

Privacy policy

The Company is committed to protect the privacy of the Customer and it will never resell or share any of Customer’s personal information, including credit card data, with any third party. All the online transactions are processed through the secure and reliable online payment systems.

Read more

Fair-cooperation guarantee

By placing an order with us, you agree to the service we provide. We will endear to do all that it takes to deliver a comprehensive paper as per your requirements. We also count on your cooperation to ensure that we deliver on this mandate.

Read more

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency

Order your paper today and save 20% with the discount code HAPPY

X
Open chat
1
You can contact our live agent via WhatsApp! Via + 1 323 412 5597

Feel free to ask questions, clarifications, or discounts available when placing an order.