Design, using an IPO chart, a flow chart, pseudocode, or any reasonable combination of these techniques,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Design, using an IPO chart, a flow chart, pseudocode, or any reasonable combination of these techniques, a module called checkGuess that accepts 2 string inputs. The first input will be the user's guess and the second input will be a secret letter chosen at random. No Python code is expected or required for this solution. If the first input is alphabetically after the second input, return a value of 1. If the first input is alphabetically before the second input, return a value of -1. If the two inputs are equal return a value of 0. Do not take upper or lower case into consideration. Use your module as part of a design, using an IPO chart, flow chart, pseudocode, or any reasonable combination of these techniques, to solve the following problem. Call your module using pseudocode like CALL checkGuess( op1, op2 ) AS val. Your pseudocode should use your own variable names instead of op1, op2, and val. Be sure to document any assumptions you make along the way in your design. Problem: A person is playing a guessing game in which they have 3 guesses to figure out the computer's secret letter. which will be between A and Z inclusive. If they guess the letter correctly on the first guess the program should stop making them guess and they should get 26 points. If they guess the letter correctly on the second guess the program should stop making them guess and they should get 13 points. If they guess the letter correctly on the third guess, they should get 7 points. After an incorrect guess tell the user if their guess was too high or too low based on the results of checkGuess. If they fail to guess the letter correctly after 3 guesses they get 0 points. Be sure to tell them what score they got. I Design, using an IPO chart, a flow chart, pseudocode, or any reasonable combination of these techniques, a module called checkGuess that accepts 2 string inputs. The first input will be the user's guess and the second input will be a secret letter chosen at random. No Python code is expected or required for this solution. If the first input is alphabetically after the second input, return a value of 1. If the first input is alphabetically before the second input, return a value of -1. If the two inputs are equal return a value of 0. Do not take upper or lower case into consideration. Use your module as part of a design, using an IPO chart, flow chart, pseudocode, or any reasonable combination of these techniques, to solve the following problem. Call your module using pseudocode like CALL checkGuess( op1, op2 ) AS val. Your pseudocode should use your own variable names instead of op1, op2, and val. Be sure to document any assumptions you make along the way in your design. Problem: A person is playing a guessing game in which they have 3 guesses to figure out the computer's secret letter. which will be between A and Z inclusive. If they guess the letter correctly on the first guess the program should stop making them guess and they should get 26 points. If they guess the letter correctly on the second guess the program should stop making them guess and they should get 13 points. If they guess the letter correctly on the third guess, they should get 7 points. After an incorrect guess tell the user if their guess was too high or too low based on the results of checkGuess. If they fail to guess the letter correctly after 3 guesses they get 0 points. Be sure to tell them what score they got. I
Expert Answer:
Answer rating: 100% (QA)
Heres a design for the checkGuess module using pseudocode along with a description of how to use it ... View the full answer
Related Book For
Fundamentals of Financial Management
ISBN: 978-1337395250
15th edition
Authors: Eugene F. Brigham, Joel F. Houston
Posted Date:
Students also viewed these programming questions
-
Cross-cultural communication was briefly covered earlier in the course. This type of communication focuses on the elements that impact communication across different cultures and how messages can be...
-
Case Study: Quick Fix Dental Practice Technology requirements Application must be built using Visual Studio 2019 or Visual Studio 2017, professional or enterprise. The community edition is not...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
discusses how a reseller can service both a consumer and an industrial market from the same store location. Provide an example of a retailer and detail the differences in their marketing activities.
-
A small 0.2 kg sphere B is given a downward velocity 0 v and swings freely in the vertical plane, first about O and then about the peg A after the cord comes in contact with the peg. Determine the...
-
A single force with x-component F x acts on a 2.0 kg object as it moves along the x-axis. A graph of F x versus t is shown in Figure P 5.32. Draw an acceleration graph (a x versus t) for this object....
-
What are the three types of employees who work in MNEs? Explain how an HCN could change to become a TCN in an MNE.
-
Consider the intersection of two shocks of opposite families, as sketched in Fig. 4.23. For M 1 = 3, p 1 = 1 atm, ? 2 = 20?, and ? 3 = 15?, calculate the pressure in regions 4 and 4?, and the flow...
-
ABC Corp. adds materials at the beginning of its production process and adds conversion costs evenly. At the beginning of the period, the inventory in process was 6 0 % complete; At the end of the...
-
REI sells snowboards. Assume the following information relates to REI's purchases of snowboards during September. During the same month, 102 snowboards were sold. REI uses a periodic inventory...
-
How do scholars of conflict resolution integrate principles of game theory and decision analysis to model and predict the dynamics of strategic interactions between conflicting parties in complex...
-
Todd's crew walks off the job believing they were not going to get paid. They have three months invested in the framing and want to get something for their trouble. Besides, they had to pay for the...
-
While the law suit is going on, Rodney hires a framing crew who goes to the house and begins work. He tells them about H2H's deal and they agree to furnish the materials and labor and get paid when...
-
While Adam is getting the purchase lined up, Stacy continues to work on financing options for future projects. She holds a meeting with several potential investors and she shares the concept of H2H,...
-
Jose purchases a new car from Mike's Deals. The retail installment contract states immediately above the buyer's signature in large, bold type: "There are no warranties that extend beyond the...
-
A group of friends, Adam, Patrick, Danica, Rodney and Stacy graduate from college together. After graduation, they are together at a party celebrating. Adam tells the group about his neighbor's house...
-
29) For the equation: PCI5 (g) PCl3 (g) + Cl2 (g), You start with 0.25 atm of each of the products as well as the reactants. The Kp value is 0.125. Is the reaction at equilibrium? Prove it. What are...
-
A spacecraft has left the earth and is moving toward Mars. An observer on the earth finds that, relative to measurements made when the spacecraft was at rest, its a. length is shorter b. KE is less...
-
This chapter discusses the discounted dividend and corporate valuation models for valuing common stocks. Three alternative approaches, the P/E multiple, Enterprise Values, and EVA approaches, were...
-
McEwan Industries sells on terms of 3/10, net 30. Total sales for the year are $1,921,000; 40% of the customers pay on the 10th day and take discounts,while the other 60% pay, on average, 70 days...
-
Suppose the exchange rate between the U.S. dollar and the Swedish krona was 7.97 krona 5 $1, and the exchange rate between the dollar and the British pound was1 5 $1.29. What would be the exchange...
-
Jennifer knows that Carters malefemale differential is indefensible? What should she do to rectify it?
-
Is there another incentive plan you think would work better for the pressers? Describe it.
-
A store managers job is to keep total wages to no more than 30% of sales and to maintain the fuel bill and the supply bill at about 9% of sales each. Managers can also directly affect sales by...
Study smarter with the SolutionInn App