Use a function from the Python random module. The random module helps us to generate random...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Use a function from the Python random module. The random module helps us to generate random numbers for playing a dice game. Write a program (called RandomNumbers.py) that uses the randint function from the random module to generate and display 50 random numbers between 1 and 6 that can be rolled with a dice. After displaying the 50 random numbers, the program also displays the counts of 1's, 2's, 3's, 4's, 5's and 6's. Submit your code. A Sample output will be: Average of 50 random numbers: 3.56 Total number of 1s: 7 Total number of 2s: 9 Total number of 3s: 7 Total number of 4s: 10 Total number of 5s: 9 Total number of 6s: 8 Use a function from the Python random module. The random module helps us to generate random numbers for playing a dice game. Write a program (called RandomNumbers.py) that uses the randint function from the random module to generate and display 50 random numbers between 1 and 6 that can be rolled with a dice. After displaying the 50 random numbers, the program also displays the counts of 1's, 2's, 3's, 4's, 5's and 6's. Submit your code. A Sample output will be: Average of 50 random numbers: 3.56 Total number of 1s: 7 Total number of 2s: 9 Total number of 3s: 7 Total number of 4s: 10 Total number of 5s: 9 Total number of 6s: 8
Expert Answer:
Answer rating: 100% (QA)
import random module import random define empty list numlist define for loop which runs 50 times and ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
Data set Theory Assume an informational record with one association parent including matches (a, b) where a can't try not to be a parent of b. (a) Write a Datalog demand which gives the graph of...
-
Ivanhoe Company was formed on July 1, 2018 It was authorized to issue 285,500 shares of $10 par value common stock and 95,400 shares of 8 $25 par value, cumulative and nonparticipating preferred...
-
Olofsson was a delivery driver for the Mission Linen Supply. In 2004, he went to Sweden for about five weeks (nonvaction time) to visit his parents. The plant manager, Jack Anderson, Sr., had said...
-
Use implicit differentiation to find dy/dx. x 3 + y 3 = 18xy
-
1. Working in small groups, complete the Pay Raise Worksheet. 2. After the class reconvenes, group spokespersons present group findings. Pay Raise Worksheet April Knepper is the new supervisor of an...
-
The following were selected from among the transactions completed by Caldemeyer Co. during the current year. Caldemeyer Co. sells and installs home and business security systems. Jan. 3. Loaned...
-
RELATIONAL DATABASE CONCEPTS: Describe the basic steps required to install the Oracle, SQL Server, and MySQL relational database management systems (RDBMSs) and the major challenges that the user may...
-
Reba Dixon is a fifth-grade school teacher who earned a salary of $38,000 in 2020. She is 45 years old and has been divorced for four years. She receives $1,200 of alimony payments each month from...
-
OP Pie Company makes dessert pies for national fast food chains. OP Ple Company is considering using ABC costing and has the following activity cost pools and information available: Activities...
-
(20 points) What is the maximum flow of the following network given that the source is vertex 1 and the sink is vertex 6? 6 5 2 1 2 5 3 6 7 8
-
Write a code to make a grammar parser for the following decision tree. Use rule-based approach. [25] S Conjunction Sub NP VP Conjunction Obj VB Det AP Noun/Pronoun Noun/Pronoun Det VM Adverb
-
Sean received a loan of $45,750, 4 years ago. The interest rate charged on the loan was 4.74% compounded quarterly for the first 9 months, 5.55% compounded semi- annually for the next 3 years, and...
-
The preliminary cost for a 41,000 ft2 aircraft hangar must be estimated. The first unit estimate was $103 per square foot. Estimate the cost of the hangar. Can someone assist me with answering this...
-
a) A technology company is making a decision about ordering a new tablet to sell during the holiday season. They are deciding whether or not to undertake market research to evaluate the potential...
-
When a broker called a random sample of eight of her clients, she got a busy signal 6.5, 10.6,8.1, 4.1, 9.3, 11.5, 7.3, and 5.7 percent of the time. Assuming that these data may be looked upon as a...
-
Calculate the electrical conductivity of a fiber-reinforced polyethylene part that is reinforced with 20 vol % of continuous, aligned nickel fibers.
-
Find the column rank of this matrix. (2 1 31 5 0 4
-
Prove or disprove that this is a vector space: the real-valued functions f of one real variable such that f(7) = 0.
-
Suppose that {v1, v2, v3, ... , vn} is a set of vectors. Prove that {v1 - v2, v2 - v3, v3 - v4, ... , vn - v1} is a linearly dependent set.
-
Verify the color SU(3) representations for combinations of three or fewer quarks and antiquarks given in Eq. (19.28). Data from Eq. 19.28 qq=303=108 qq 3 3 603, 999 3 3 3 = 36315, qqq 3 3 3 1088 10,
-
Prove that Eq. (19.34) gives the simplest multi-gluon and gluon-quark states that contain an \(\mathrm{SU}(3)\) color singlet in the decomposition. Data from Eq. 19.34 (GG)1: (88)1 (Gqq) : [8 (383)8]...
-
A textile manufacturer is concerned about the strength of cotton yarn. In order to nd out whether fiber length is an important factor in determining the strength of yarn, the quality control manager...
Study smarter with the SolutionInn App