Problem Description: My local school district requires an application to compare the average score of boys...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Problem Description: My local school district requires an application to compare the average score of boys in a certain test with that of girls. Write an interactive application in Python to display a simple menu to the user. Have them pick a choice for boy (b), girl (g), or quit (q) to quit the program. The program should keep looping until the user chooses to quit. This application will use loops and conditions to accomplish the task. Inputs Your Python program should accept data input by the user, as indicated in the sample dialog below. Your program should allow an arbitrary number of boy scores and girl scores, terminated when the user inputs a 'q'. Output Your program should output the average boy score and average girl score. Please see the dialog sample below for specifics. Text in red is that which is entered by the user. Examples of output Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:01:18) [MSC v.1900 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. RESTART: C:/Temp/a04.py: Boy (b), Girl (g) or Quit (q): b Boy score: 10 Boy (b), Girl (g) or Quit (q): g Girl score: 12 Boy (b), Girl (g) or Quit (q): b Boy score: 14 Boy (b), Girl (g) or Quit (q): g Girl score: 14 Boy (b), Girl (g) or Quit (q): g Girl score: 16 Boy (b), Girl (g) or Quit (q): q Boy Average is: 12.0 Girl Average is: 14.0 Problem Description: My local school district requires an application to compare the average score of boys in a certain test with that of girls. Write an interactive application in Python to display a simple menu to the user. Have them pick a choice for boy (b), girl (g), or quit (q) to quit the program. The program should keep looping until the user chooses to quit. This application will use loops and conditions to accomplish the task. Inputs Your Python program should accept data input by the user, as indicated in the sample dialog below. Your program should allow an arbitrary number of boy scores and girl scores, terminated when the user inputs a 'q'. Output Your program should output the average boy score and average girl score. Please see the dialog sample below for specifics. Text in red is that which is entered by the user. Examples of output Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:01:18) [MSC v.1900 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. RESTART: C:/Temp/a04.py: Boy (b), Girl (g) or Quit (q): b Boy score: 10 Boy (b), Girl (g) or Quit (q): g Girl score: 12 Boy (b), Girl (g) or Quit (q): b Boy score: 14 Boy (b), Girl (g) or Quit (q): g Girl score: 14 Boy (b), Girl (g) or Quit (q): g Girl score: 16 Boy (b), Girl (g) or Quit (q): q Boy Average is: 12.0 Girl Average is: 14.0
Expert Answer:
Related Book For
Introduction to Probability and Statistics
ISBN: 978-1133103752
14th edition
Authors: William Mendenhall, Robert Beaver, Barbara Beaver
Posted Date:
Students also viewed these programming questions
-
The Transportation Security Administration would like to compare the average amount of time it takes passengers to pass through airport security at Philadelphia versus Orlando during peak times. A...
-
An economist wants to compare the average monthly number of rotary oil rigs running in three states: California, Utah, and Alaska. In order to account for month-to-month variation, three months were...
-
A study is being conducted to compare the average training time for two groups of airport security personnel: those who work for the federal government and those employed by private security...
-
Canton Company makes two types of cell phones. Handy is a thin, pocket-size cell phone that is easy to carry around. Action is a palm-size phone convenient to hold while the user is talking. During...
-
What is a value-weighted index? Explain the impact that large firms have on value-weighted indexes such as the S&P 500.
-
For a Poisson random variable with rate and time interval t, the possible values of x are 0, 1, 2, ..., .
-
External and internal costs: a How do external and internal environmental costs differ? Provide three examples of an external, and four examples of an internal, environmental cost. In your examples...
-
Petty Cash Mc Mann, Inc. decided to establish a petty cash fund to help ensure internal control over its small cash expenditures. The following information is available for the month of April. 1. On...
-
13) Let f(x, y, z) = x^2y^2z^2 + xy + xz + yz, calculate the distinct second order partial derivatives of f and the third order partial derivative fxyz.
-
Show that in the multiple regression of y on a constant, x1 and x2 while imposing the restriction 1 + 2 = 1 leads to the regression of y x1 on a constant and x2 x1.
-
Susan and Tom Houser believe that they will need payments of $4,460 at the beginning of each of their retirement. The payments will be made out of an account that is expected to earn 10% interest...
-
Prepare journal entries to record the following merchandising transactions of Cabela's, which uses the perpetual inventory system and the gross method. July 1 Purchased merchandise from Boden Company...
-
When you teach a child something you take away forever his chance of discovering it for himself." Jean Piaget How is this quote related to Piaget's theory, particularly constructivism? Do you agree...
-
You're examining the output of the ipconfig command issued on an Apple Mac running MacOS, which shows IP address information for the computer. You notice that this computer has an IPv6 address of...
-
The following data are taken from the Browning Corporation's inventory accounts: Net Item Unit Realizable Code Quantity Cost ACE Value 100 $25 $24 BOF 300 30 31 GH MBS 400 20 200 18 23 27 Calculate...
-
Via Gelato, a popular neighborhood gelato shop, provided the following cost formulas and actual results for the month of June: Revenue Fixed Element Variable Element per Liter $ 24.00 Actual Total...
-
Xavier, the owner of The Fabric Corner, lent $15,000 to Dani to open her own card shop. Dani plans to repay Xavier at the end of seven years with 8% interest compounded quarterly. How much will...
-
What is a lobbyist in US? How did this term emerge?
-
Refer to Exercise 10.83. Suppose you wish to estimate the difference in mean times to absorption correct to within 1 minute with probability approximately equal to .95. a. Approximately how large a...
-
Last year's records of auto accidents occurring on a given section of highway were classified according to whether the resulting damage was $1000 or more and to whether a physical injury resulted...
-
The meat department of a local supermarket chain packages ground beef using meat trays of two sizes: one designed to hold approximately 1 pound of meat, and one that holds approximately 3 pounds. A...
-
__________________ and __________________ are lowered to increase the camber of the wings and provide greater lift and control at slow speeds.
-
If the failure of a structure causes a loss of control of the aircraft or leads to a catastrophic structural collapse, the structure is classified as __________________ structure.
-
Wing sweepback is designed to delay or alleviate shock induced separation of airflow and improves aerodynamic performance.
Study smarter with the SolutionInn App