Write a program which asks the user to enter their favourite number between 0 and 100....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program which asks the user to enter their favourite number between 0 and 100. Generate a random number between 0 and 100. Display both numbers and the maximum and minimum. Your program must match the sample output shown below exactly. Sample runs: Enter your favourite number between 0 and 100: 22 The random number is 25 The max is 25 and the min is 22 Enter your favourite number between 0 and 100: 77 The random number is The max is 77 and the min is 545 Write a program which asks the user to enter their favourite number between 0 and 100. Generate a random number between 0 and 100. Display both numbers and the maximum and minimum. Your program must match the sample output shown below exactly. Sample runs: Enter your favourite number between 0 and 100: 22 The random number is 25 The max is 25 and the min is 22 Enter your favourite number between 0 and 100: 77 The random number is The max is 77 and the min is 545
Expert Answer:
Answer rating: 100% (QA)
Python import random Ask the user for their favorite number usernumber intinputEnter you... 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...
-
Considerations that affect the selection of an inventory costing method do not include: (a) tax effects. (b) balance sheet effects. (c) income statement effects. (d) perpetual vs. periodic inventory...
-
IKEA found success in the international market by localizing its products for different consumers' needs. Discuss how the company may need to change its strategies in response to evolving tastes...
-
What is the age of planet Earth? When did the oceans form? What is the age of the earliest known microfossil?
-
What was the approximate activity of the plutonium source at the start of the mission? A. \(2 \times 10^{21} \mathrm{~Bq}\) B. \(2 \times 10^{19} \mathrm{~Bq}\) C. \(2 \times 10^{17} \mathrm{~Bq}\)...
-
Healthy Living Foods, Inc., is authorized to issue 4,250,000 shares of $1.00 par common stock . In its initial public offering during 2012, Healthy Living issued 390,000 shares of its $1.00 par...
-
The expected returns and standard deviation of returns for two securities are as follows: X Y 15% 15% Standard deviation 10% 20% Expected return Assume that the correlation between the returns of the...
-
The information provided in this test allows you to set up the Cieneral, Payables and Receivables ledgers for an Ontario company named CHRIS'S WELDING owned and run by Chris George, amaster welder....
-
Write an essay about volunteering and what you did is volunteered your time to feed the homeless on "thanksgiving day" with your friends in downtown Nashville. The essay has to be well writing and...
-
4. Suppose that we want to find a feasible circulation in the network below with flows on each edge in the specified lower and upper bounds. a [5, 11]- d [3,7] [1,3] [1,6] [1,6] Find a feasible...
-
Consider the vectors --37+47 and 7-47-27 + 5E- (a) Find the magnitude of . (b) Find a unit vector that points in the direction opposite to that of. (c) Find the angle between and 7.
-
JavaScript Question In merge sort, which uses a divide-and-conquer approach to sortan array of values. There are many more algorithms that takes suchan approach. Implement a function that computes...
-
If you live outside the limits of a city in Texas, water, sewer, sanitation, and electricity services are offered by Question 5 options: a) auxiliary utility districts (AUDs). b) federal utility...
-
(b) Use MATLAB to calculate &=y-X(XX)'X'y and ', where 1 X 1-1-1 - 10 1 1 -1 -1 20 1 - -1 15 1 - -1 and 13 y 1 1 1 -1 - - 1 23 1 24 1 28 11 1 16 Show your final results of and ', as well as the...
-
Rank the following groups of compounds in order of decreasing solubility in water: a. CH;CH2CH,OH CH;CH,CH,CH,CI CH;CH,CH,CH,OH HOCH,CH,CH,OH b. CH3 NH2 PROBLEM 24 In which of the following solvents...
-
SCHEDULE OF COST OF GOODS MANUFACTURED The following information is supplied for Sanchez Welding and Manufacturing Company. Prepare a schedule of cost of goods manufactured for the year ended...
-
Write a user-defined function that finds all the prime numbers between two numbers m and n. Name the function pr=prime (m, n), where the input arguments m and n are positive integers and the output...
-
Use the growth data from Problem 22 for the following: (a) Curve-fit the data with a third-order polynomial. Use the polynomial to estimate the height in week 6. (b) Fit the data with linear and...
-
The demand for water during a fire is often the most important factor in the design of distribution storage tanks and pumps. For communities with populations less than 200,000, the demand Q (in...
-
Consider the dynamic system, a mass, spring and damper structure, shown in Figure 2.2. (a) Draw a free-body diagram for the dynamic system (b) Derive the Input-Output model of the dynamic system k...
-
Two connected cars with an applied input force \(u(t)\) and negligible rolling friction can be represented by a translational mechanical system as shown below. (a) Draw the free-body diagrams of this...
-
Consider an RLC circuit consisting of a resistor \((R)\), an inductor \((L)\), and a capacitor \((C)\), connected in series, as depicted in Figure 2.4. Derive the Input-Output model of the network....
Study smarter with the SolutionInn App