Question
* Urgent help needed * Hello, I am doing Python3 in Ubuntu linux command line and I need your help please: Task2 Write a die
*Urgent help needed*
Hello, I am doing Python3 in Ubuntu linux command line and I need your help please:
Task2 Write a die rolling class that contains the following methods:
- A constructor that accepts an integer representing the number of sides on the die.
- A get_sides method that will return the number of sides
- A roll method that will return a random number as a result of rolling the die
- A roll_multiple method that takes a number of rolls and returns a list of the results
Class usage | Example output of script |
idie = Die(20) idie.get_sides() idie.roll() idie.roll_multiple(4) | 20 14 [4,16,1,9] |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started