Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use a solution with the information given, I have tried to figure it out with other solutions and I have not been able to

Please use a solution with the information given, I have tried to figure it out with other solutions and I have not been able to. Given a GVDie object and an integer that represents the total sum desired as parameters, complete function roll_total) number of rolls needed to achieve at least the total sum. Note: For testing purposes, the GVDie object is created in the main() function using a pseudo-random number generator value. The program uses a seed value of 15 during development, but when submitted, a different seed value will be used Ex: If the GVDie object is created with a seed value of 15 and the input of the program is: LAB 9.23.1: LAB: How many dice rolls?
ACTIVITY 9.0/10 main.py Load default template 1 import random
2
3 class GvDie:
4 def _init__(self):
5 random.self(self)
6 self.my_value = random, randint (1,6)
7 self.rand - random. Random()
8 def roll(self):
9 self.my_value = self, rand, randint (1,6)
10
11 # set the random number generator seed for testing
12 def set_seed(self, seed):
13 self, rand, seed(seed)
14........ When done developing your program, press the Submit for grading button below. This will submit your program for auto-grading. LAB 9.23.1: LAB: How many dice rolls?
ACTIVITY .0/10 main.py Load default template...

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Driven Web Sites

Authors: Mike Morrison, Joline Morrison

1st Edition

061901556X, 978-0619015565

More Books

Students also viewed these Databases questions