Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

class Roulette: def is tampered(self, rolls): pass Introduction Roulette is a game if chance (gambling) where players bet on where a ball will land on

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
class Roulette: def is tampered(self, rolls): pass Introduction Roulette is a game if chance (gambling) where players bet on where a ball will land on the roulette wheel. The wheel has the numbersi 0 , 00. and 1 to 36 . The 0 and 00 are coloured green, while all other numbers are red or blick in equal amounts. All numbers are supposed to have an equally likely chance of being landed on. In practice, some numbers will be landed on before some numbers are landed on at all. Similarly, if we were to look at 50 consecutive plays, one colour of numbers (red or black) will occur more than the other, However, if one color of numbers comes up significantly more: then something is wrong. Task Your task is to write a program to determine if a roulette wheel has been tampered with to produce more red or black rolls. Complete the method that accepts a list of roulette rolls and outputs a string indicating if it has been tampered with. A wheel is considered tampered with if one colour comes up 30% or more than the other. If the list of rolls is less than 10 , there is not enough data to decide, Examples 2 print( r.is_tampered(rolls)) The above would print "tampered," This is because reds come up 8 times and black comes up 11

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_2

Step: 3

blur-text-image_3

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

Visual Basic Net Database Programming

Authors: Rod Stephens

1st Edition

0789726815, 978-0789726810

More Books

Students also viewed these Databases questions