(This is an extension of an exercise from Chapter I.) A simple rule to estimate your ideal body weight is to allow 110 pounds for the first 5 feet of height and 5 pounds for each additional inch. Create the following text in a text file. It contains the names and heights in feet and inches of Tom Atto Eaton Wright
Tom Atto
6
3
Eaton Wright
5
5
Cary Oki
5
11
Write a
Want to see the full answer?
Check out a sample textbook solutionChapter 2 Solutions
Absolute C++
Additional Engineering Textbook Solutions
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Electric Circuits. (11th Edition)
Java: An Introduction to Problem Solving and Programming (8th Edition)
Web Development and Design Foundations with HTML5 (8th Edition)
Degarmo's Materials And Processes In Manufacturing
- CODE SHOULD BE PYTHON:arrow_forwardWrite a regular expression that matches the day of year such as "1-1-2018" or "7/4/1776". Dates like "9-31-1955", "3/29-2018", and"5-28/1956" should not be matched. You do not have to worry about leap years (i.e. assume February has 28 days every time). Edit View Insert Format Tools Table 12pt v Paragraph v A To 田 画 D O wordsarrow_forwardTeams.txt .This file contains a list of serveral Major League baseball teams in alphabetical order. Each team is listed in the file has won the World Series at least once. WorldSeries Winners.txt - This file contains a chronological list of the World Series' winning teams from 1903-2020. (The first line of the file is the name of the team that won in 1903, and the last line is the name of the team that won in 2020. Note the World Series was not played in 1904 or 1994.) Write a program that displays the contents of the Teams.txt file on the screen and prompts the user to enter the name of one of the teams. The program should then display the number of times that team has won the World Series in the time period from 1903 to 2020. In the program, 2 arrays are needed: TeamList array and Winners array. TeamList array will contain the entries in Teams.txt. Winners array will contain the entries in WorldSeriesWinners.txt. Use a search algorithm to validate if the entry from the user is…arrow_forward
- File names: color_square.py, chessboard.py, test_squares.py Positions on a chess board are identified by a letter and a number. The letter identifies the column; the number identifies the row. See the image below. You will provide the functions that allow us to determine: if a chessboard square is either black or white, given its coordinates. If the row/column is valid or not for the standard chessboard For example, if we pass in “d” for the column and 4 for the row, your function that determines color should return the string: “BLACK”. If we pass in "k" for the column to your function that validates columns, that function should return the boolean False. Requirements: Your function for validating the column should be able to accept upper or lowercase strings as parameters. Your functions for validating the row should be able to accept integers or strings as parameters. Your function that determines black-or-white may assume that the input has been validated prior to us calling…arrow_forwardThe file Scores.txt contains exam scores. The first four lines of the file hold the numbers 59, 60, 65, and 75. Write a program to calculate the mean and standard deviation of the exam scores, assign letter grades to each exam score, ES, as follows, and then display information about the exam scores and the grades. Possible outcome: Number of scores: 14 Average score: 71.0 Standard deviation of scores: 14.42 GRADE DISTRIBUTION AFTER CURVING GRADES. A: 2 B: 1 C: 6 D: 4 F: 1 ES > m + 1.5s A m + .5s < ES < m + 1.5s m - .5s < ES < m + .5s C m = 1.5s < ES < m - .5s D ES < m 1.5sarrow_forwardplease code in python The data for this product is stored in the text file named GasPrice.txt [The image]. The file contains the weekly average prices for a gallon of gas in the United States, beginning on April 5th, 1993, and ending on August 26th, 3013. The following is a sample of the first few lines of the data file. Each line in the file contains the average price for a gallon of gas on a specific date. Each line is formatted in this way: MM-DD-YYYY:Price Where MM is the two-digit moth, DD is two-digit day, and YYYY is the four-digit year. Price is the average price per gallon of gas on the specific day. For this project, you are to develop one or more programs that read the data from the data file, and perform these tasks: Average Price Per Year: Calculate the average price of gas per year, for each year in the file. Average Price Per Month: Calculate the average price for each month in the file. Highest and Lowest Prices Per Year: For each year in the data file,…arrow_forward
- Programming in c languagearrow_forwardThis program reads the text file created in the program above and displays its data. Use f-strings to create a table of rows and columns with column headings as follows: PLAYER COLUMN: 10 characters wide and left-aligned. GOALS COLUMN: 6 characters wide and centered. ASSISTS COLUMN: 8 characters wide and centered. TOTAL COLUMN: 6 characters wide and centered. After printing the stats for each player, the program should report the name of the top scorer and his total points (goals + assists).arrow_forwardinstruction- This file should have multiple lines, each line has first name, last name followed by multiple integers “data.txt” file Samantha Johns 43, 32,99, 79, 85 Michael Smith 98, 84, 70, 100, 76, 81 John Michael 82,92, 92 Mary Hernandez 88, 91, 92, 79, 78 George Johnson 92,93,75 Sara Anderson 83,74. Susan John 78, 84,65, 71,81 Mark Smith 69, 67,59,62arrow_forward
- using Python, complete the table using the input.txt and displaying the table format shown in the questionarrow_forwardChapter 7 - Programming Challenge 15 15. World Series Champions If you have downloaded this book’s source code (the companion Web site is available at www.pearsonhighered.com/gaddis), you will find a file named WorldSeriesWinners.txt. This file contains a chronological list of the winning teams in the World Series from 1903 through 2009. (The first line in the file is the name of the team that won in 1903, and the last line is the name of the team that won in 2009. Note that the World Series was not played in 1904 or 1994, so those years are skipped in the file.) Write a program that lets the user enter the name of a team, and then displays the number of times that team has won the World Series in the time period from 1903 through 2009. Tip: Read the contents of the WorldSeriesWinners.txt file into an ArrayList. When the user enters the name of a team, the program should step through the ArrayList, counting the number of times the selected team appears You only need to submit the…arrow_forwardThe Apgar Medical group keeps a patient file for each doctor in the office. Each record contains the patient's first and last name, home address, and birth year. The records are sorted in ascending birth year order. Write a program so that display a count of the number of patients born each year John Hanson, 23 Elm, 1927Mary Locust, 476 Maple, 1950Susan Monroe, 512 Peachtree, 1957Carol Fortune, 2819 Locust, 1960James Fortune, 2819 Locust, 1963Lawrence Fish, 12 Elm, 1968Janice Weiss, 234 Birch, 1971Henry Garza, 199 Second, 1973Kimberly Swanson, 310 Appletree, 1980Louis Claude, 2716 Third, 1981Jill Fox, 12 Oak, 1985Opal Reynolds, 78 County Line, 1987Francis Dumas, 67 Fourth, 1992Madison Conroy, 23 Fifth, 1996Daniel Moy, 100 Sunset, 1987arrow_forward
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT