You are playing the game of Monopoly and you decide you wish to construct houses on...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
You are playing the game of Monopoly and you decide you wish to construct houses on one of your property groups. The rules of the game require that the number of houses on the properties within each group may not differ by more than one. You will be given an amount of money to spend, and the color Monopoly uses on the game board for a group of properties (see chart below). The goal is to determine how many houses will go on each. And to appear more conversational, the last line of output will use words to represent numbers instead of digits. To make the program simple, you may assume that you will not have enough money to build past four houses per property (twelve total). You do not need to convert the price of a house to a word (although that can be done rather simply). Monopoly Property Groups Here is a small table relating the colors of the monopoly property groups, the number of properties within the group, and the cost of the houses. color size cost purple 50 light blue 50 maroon 100 orange 3 100 red 150 yellow 150 green 3 200 dark blue 200 Sample Interfaces Which color block will you be building on? orange How much money do you have to spend? 860 There are three properties and each house costs 100 You can build eight house(s) -- one will have two and two will have three nouses (lo otier property mlay Have lewer than Tour). The inputs to the program will be essentially the same -- the color of a property group and the amount of money to be spent. But the following cases should be addressed: • if no building is affordable, display "You cannot afford even one house." instead of building 0 houses everywhere. • If any property could have 5 houses, announce that such properties would have a hotel instead. • if any property could have more than 5 houses, still only build one hotel there, and nothing more • omit the word 'none' in the output (i.e don't say 'one property has none' or 'none have two') Comparing Homework 2 to Homework 3 The difference in these programs primarily appears in the final output statement: Hypothetical Homework 2 Output Corresponding Homework 3 Output three will have none and none will have one You cannot afford even one house. one will have one and two will have two one will have one and two will have two one will have none and two will have one two will have one three will have one and none will have two three will have one three will have three and none will have four three will have three two will have four and one will have five two will have four and one will have a hotel two will have five and none will have six two will have a hotel one will have seven and two will have eight three will have a hotel Hint: The simplest and clearest solutions will use 'else' and 'elif' and will not need 'and' or 'or'. A portion of your grade is based on how clear your code is, and how well it avoids producing contradictory output. Note: All of these decisions in this chart are entirely based on the results of the previous program, so your code should do the same -- wait until the calculations are complete before deciding how to display the results. Do not make your program unnecessarily complicated by trying to identify the different cases before doing any math. Also Note: three hotels have the cost of 15 houses, which will require a slight modification to the collection of words used to display numbers in the previous assignment. If the number of houses one can afford exceeds 15 (that last row above could have afforded 23), just display the numeric value itself, without converting to a word. You are playing the game of Monopoly and you decide you wish to construct houses on one of your property groups. The rules of the game require that the number of houses on the properties within each group may not differ by more than one. You will be given an amount of money to spend, and the color Monopoly uses on the game board for a group of properties (see chart below). The goal is to determine how many houses will go on each. And to appear more conversational, the last line of output will use words to represent numbers instead of digits. To make the program simple, you may assume that you will not have enough money to build past four houses per property (twelve total). You do not need to convert the price of a house to a word (although that can be done rather simply). Monopoly Property Groups Here is a small table relating the colors of the monopoly property groups, the number of properties within the group, and the cost of the houses. color size cost purple 50 light blue 50 maroon 100 orange 3 100 red 150 yellow 150 green 3 200 dark blue 200 Sample Interfaces Which color block will you be building on? orange How much money do you have to spend? 860 There are three properties and each house costs 100 You can build eight house(s) -- one will have two and two will have three nouses (lo otier property mlay Have lewer than Tour). The inputs to the program will be essentially the same -- the color of a property group and the amount of money to be spent. But the following cases should be addressed: • if no building is affordable, display "You cannot afford even one house." instead of building 0 houses everywhere. • If any property could have 5 houses, announce that such properties would have a hotel instead. • if any property could have more than 5 houses, still only build one hotel there, and nothing more • omit the word 'none' in the output (i.e don't say 'one property has none' or 'none have two') Comparing Homework 2 to Homework 3 The difference in these programs primarily appears in the final output statement: Hypothetical Homework 2 Output Corresponding Homework 3 Output three will have none and none will have one You cannot afford even one house. one will have one and two will have two one will have one and two will have two one will have none and two will have one two will have one three will have one and none will have two three will have one three will have three and none will have four three will have three two will have four and one will have five two will have four and one will have a hotel two will have five and none will have six two will have a hotel one will have seven and two will have eight three will have a hotel Hint: The simplest and clearest solutions will use 'else' and 'elif' and will not need 'and' or 'or'. A portion of your grade is based on how clear your code is, and how well it avoids producing contradictory output. Note: All of these decisions in this chart are entirely based on the results of the previous program, so your code should do the same -- wait until the calculations are complete before deciding how to display the results. Do not make your program unnecessarily complicated by trying to identify the different cases before doing any math. Also Note: three hotels have the cost of 15 houses, which will require a slight modification to the collection of words used to display numbers in the previous assignment. If the number of houses one can afford exceeds 15 (that last row above could have afforded 23), just display the numeric value itself, without converting to a word.
Expert Answer:
Answer rating: 100% (QA)
Required solution color inputWhich color block will you be building on m intinputHow much money do y... View the full answer
Related Book For
Posted Date:
Students also viewed these accounting questions
-
You are playing the role of a loan officer. You have to make the determination whether Don Jones gets a loan. You will use some combination of his credit score, income, and net worth to either grant...
-
How will you decide whether or not your benefits program is an effective one? Describe the procedure that you would use. What specific criteria would you use?
-
You are playing a game with a friend. Its your move but you dont have a dominant strategy. Your payoff depends on what your friend does after your move. You consider flipping a coin to decide what to...
-
QUESTION 17 The moment of a force about a pivot point is; a. The force multiplied by the perpendicular distance fro the pivot point to the direction of the force b. the distance from the pivot to the...
-
An ergodic random process has a correlation function given by What is the mean of this process? 2 +2 r2
-
This is a bit new for me, said Maddie, the new controller at the 600room Fairmont Hotel. I know, said Marcus, the hotels general manager, but you will catch on pretty quick Im sure. And I am...
-
What three responsibilities do generally accepted auditing standards impose in compliance audits of governmental entities?
-
Suppose the following information was taken from the 2014 financial statements of FedEx Corporation, a major global transportation/delivery company. Instructions Answer each of the following...
-
The extremes of the X-ray portion of the electromagnetic spectrum range from approximately 1.0x108 m to 1.0x10-13 m. a. Find the minimum accelerating voltages required to produce wavelengths at these...
-
Which entities on the chart are affiliates of the audit client Port Co A? 100% ownership. 55% fund assets Port. Co. A Audit Client Fund 1 30% ownership, 4% fund assets Port. Co. B GP/RIA 1% ownership...
-
Evaluate the indefinite integral by parts. Jx cos 9x dx cos 9x + sin 9x +C 1 san 9x + conx+C 81 O ootion2 option cor 9+in + con 81 a 9x + sin. 9 +
-
The demand for labor in a particular market is ________. a) the sum of all the individual labor supply curves b) the sum of all the fi rms MRP curves c) the sum of all the individual labor supply...
-
According to the backward-bending supply curve, as the hourly wage rate increases from 0 to $10,000 the number of hours worked per week by the average person will ________. a) be constant b)...
-
Which statement is the most accurate? a) Every large labor union is a member of the AFLCIO. b) Labor union membership as a percentage of the labor force in the United States declined steadily from...
-
Economic rent is ___________.
-
Web Activity: How much will you earn when you graduate? Go to www.payscale.com and after answering a series of questions about which college you are attending, your major, and your job skills, you...
-
Gluon Inc. is considering the purchase of a new high pressure glueball. It can purchase the glueball for $40,000 and sell its old low-pressure glueball, which is fully depreciated, for $6,000. The...
-
Frontland Advertising creates, plans, and handles advertising campaigns in a three-state area. Recently, Frontland had to replace an inexperienced office worker in charge of bookkeeping because of...
-
In which of the following situations is adverse selection not a concern? a. A company offers employees the opportunity to purchase group health insurance. b. A company requires employees to purchase...
-
Determine whether each of the following questionable statements is best explained by correlation without causation, an omitted variable, or reverse causation. a. In cities that have more police,...
-
When the federal government borrows money, it can fund higher expenditures in the short term, but incurs a debt that accrues interest and has to be paid off in the long term. What does this imply...
-
Determine the fundamental frequency of a uniform fixed-fixed beam carrying a mass \(M\) at the middle by applying Rayleigh's method. Use the static deflection curve for \(W(x)\).
-
Applying Rayleigh's method, determine the fundamental frequency of a cantilever beam (fixed at \(x=l\) ) whose cross-sectional area \(A(x)\) and moment of inertia \(I(x)\) vary as \(A(x)=A_{0} x /...
-
Using Rayleigh's method, estimate the fundamental frequency for the lateral vibration of a uniform beam fixed at both the ends. Assume the deflection curve to be \[W(x)=c_{1}\left(1-\cos \frac{2 \pi...
Study smarter with the SolutionInn App