Question: Given the following code in Python: 1 import random 2 y=random.randint(1,10) 3 if y>=1 and y < 3: 4 print(A) 5 elif y>=3 and y

Given the following code in Python:

1 import random

2 y=random.randint(1,10)

3 if y>=1 and y < 3:

4 print("A")

5 elif y>=3 and y<=7:

6 print("B")

7 else: print("C")

What is the probability (represented as a decimal) that "C" will be printed?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!