collect a head before any eyes, mouth or horn can be added. ode, it is worth playing this game a few times using a pencil, paper and an https://rolladie.net/roll-a-d8-die). Choose whether you are going to build a Fore you begin. s game as one Python function. The function should have one parameter o select whether a Unicorn or a Pegasus is built. Follow the steps and logic hysical game. Your code should include enough print statements to generate ial example illustrating a play of the game, telling the story as the dice is rolled re's body parts are assembled. Explain carefully what steps you have taken to (not just debugging). Please provide both your code and the output from one each of Unicorn and Pegasus. [15 marks] thon code to add at least three counts that effectively summarise a game, y dice rolls are made. Use these summary counts to compare building a uilding a Pegasus. Also implement a variant in which the player builds one orn and one complete Pegasus in parallel (while carefully satisfying the body parts for both creatures), and compare the resulting counts with those game (making some relevant conclusions). Please provide separate Python iginal game with counts and the variant, together with output from sample nd a comparison of counts in a table for the Unicorn-only, Pegasus-only and -I versions. (10 marks)

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
7143CEM Programming for Data Science - Portfolio (draft version)
Task 2. Design, build and test (ILO2)
Unicorn vs Pegasus is a simple dice game for one player. The aim is to collect all the body parts of
either a Unicorn or a Pegasus (both mythical horse-like creatures). Rolling an unbiased eight-sided
dice, a 1 gives a body, 2 gives a tail, 3 gives a leg, 4 gives a head, 5 gives an eye, 6 gives a mouth, 7
gives a wing, and 8 gives a horn. A player must collect a body before any other body parts can be
added. A player must collect a head before any eyes, mouth or horn can be added.
Before you write any code, it is worth playing this game a few times using a pencil, paper and an
eight-sided dice (or use https://rolladie.net/roll-a-d8-die). Choose whether you are going to build a
Unicorn or Pegasus before you begin.
(1) Implement this game as one Python function. The function should have one parameter
which is used to select whether a Unicorn or a Pegasus is built. Follow the steps and logic
you take in a physical game. Your code should include enough print statements to generate
a clear nontrivial example illustrating a play of the game, telling the story as the dice is rolled
and the creature's body parts are assembled. Explain carefully what steps you have taken to
test your code (not just debugging). Please provide both your code and the output from one
sample run for each of Unicorn and Pegasus.
[15 marks]
(2) Modify your Python code to add at least three counts that effectively summarise a game,
e.g., how many dice rolls are made. Use these summary counts to compare building a
Unicorn with building a Pegasus. Also implement a variant in which the player builds one
complete Unicorn and one complete Pegasus in parallel (while carefully satisfying the
precedence of body parts for both creatures), and compare the resulting counts with those
of the original game (making some relevant conclusions). Please provide separate Python
code for the original game with counts and the variant, together with output from sample
runs of each and a comparison of counts in a table for the Unicorn-only, Pegasus-only and
both-in-parallel versions.
[10 marks]
Transcribed Image Text:7143CEM Programming for Data Science - Portfolio (draft version) Task 2. Design, build and test (ILO2) Unicorn vs Pegasus is a simple dice game for one player. The aim is to collect all the body parts of either a Unicorn or a Pegasus (both mythical horse-like creatures). Rolling an unbiased eight-sided dice, a 1 gives a body, 2 gives a tail, 3 gives a leg, 4 gives a head, 5 gives an eye, 6 gives a mouth, 7 gives a wing, and 8 gives a horn. A player must collect a body before any other body parts can be added. A player must collect a head before any eyes, mouth or horn can be added. Before you write any code, it is worth playing this game a few times using a pencil, paper and an eight-sided dice (or use https://rolladie.net/roll-a-d8-die). Choose whether you are going to build a Unicorn or Pegasus before you begin. (1) Implement this game as one Python function. The function should have one parameter which is used to select whether a Unicorn or a Pegasus is built. Follow the steps and logic you take in a physical game. Your code should include enough print statements to generate a clear nontrivial example illustrating a play of the game, telling the story as the dice is rolled and the creature's body parts are assembled. Explain carefully what steps you have taken to test your code (not just debugging). Please provide both your code and the output from one sample run for each of Unicorn and Pegasus. [15 marks] (2) Modify your Python code to add at least three counts that effectively summarise a game, e.g., how many dice rolls are made. Use these summary counts to compare building a Unicorn with building a Pegasus. Also implement a variant in which the player builds one complete Unicorn and one complete Pegasus in parallel (while carefully satisfying the precedence of body parts for both creatures), and compare the resulting counts with those of the original game (making some relevant conclusions). Please provide separate Python code for the original game with counts and the variant, together with output from sample runs of each and a comparison of counts in a table for the Unicorn-only, Pegasus-only and both-in-parallel versions. [10 marks]
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Datatypes
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education