File Format Team1 # Team number 5 # Number of Trukeys 25 30 23 22 21 # Weight of 5 turkeys, (each separated by space) end Team1 Team2 3 25 30 23 end Team2 Team3 # Team number # Number of Trukeys #Weight of 3 turkeys # Team number # Number of Trukevs

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter13: File Input And Output
Section: Chapter Questions
Problem 7PE
icon
Related questions
Question

using Python, complete the table using the input.txt and displaying the table format shown in the question 

1
2
3
5
6
7
8
9
10
11
12
13
Input
The application input is a file with the information in the following format.
File Format
Team1
# Team number
5
# Number of Trukeys
25 30 23 22 21 # Weight of 5 turkeys, (each separated by space)
end Team1
Team2
3
25 30 23
end Team2
Team3
1
25
end Team3
−1
# Team number
# Number of Trukeys
# Weight of 3 turkeys
# Team number
# Number of Trukeys
# Weight of 1 turkey
#End of data
Processing and Output
Your program should accept the file as above ( You can create the above file
using notepad, notepad++, or any other text editor. Please do not use
Microsoft word to create the input file).
Read the input from the file and process it; the program will display summary statis-
tics for the teams. This will include a table with the weights of all turkeys caught and
the turkey count, total weight, heaviest turkey, lightest turkey, and average weight;
rank the teams based on the average weight; and write the result to another file (Use
python code within your program to write to the output file). The Table below gives
you an idea of what needs to be displayed on the screen. You should have the Title
description line in the file as the first line. Each Title can be separated with a Tab
or a Space, followed by one line per Team under the first line. Place the appropriate
information under the title, separated by a Space or a Tab.
Team name can be ten characters max. Other titles are an actual number of chars as
displayed. All the weights (0 to 100), two decimal places. Team Rank is an integer.
Teams Count W1 W2 W3 W4 W5 Total WT Heaviest Tky Lightest Tky Av. WT T Rank
Team 1 5
Team 2
Transcribed Image Text:1 2 3 5 6 7 8 9 10 11 12 13 Input The application input is a file with the information in the following format. File Format Team1 # Team number 5 # Number of Trukeys 25 30 23 22 21 # Weight of 5 turkeys, (each separated by space) end Team1 Team2 3 25 30 23 end Team2 Team3 1 25 end Team3 −1 # Team number # Number of Trukeys # Weight of 3 turkeys # Team number # Number of Trukeys # Weight of 1 turkey #End of data Processing and Output Your program should accept the file as above ( You can create the above file using notepad, notepad++, or any other text editor. Please do not use Microsoft word to create the input file). Read the input from the file and process it; the program will display summary statis- tics for the teams. This will include a table with the weights of all turkeys caught and the turkey count, total weight, heaviest turkey, lightest turkey, and average weight; rank the teams based on the average weight; and write the result to another file (Use python code within your program to write to the output file). The Table below gives you an idea of what needs to be displayed on the screen. You should have the Title description line in the file as the first line. Each Title can be separated with a Tab or a Space, followed by one line per Team under the first line. Place the appropriate information under the title, separated by a Space or a Tab. Team name can be ten characters max. Other titles are an actual number of chars as displayed. All the weights (0 to 100), two decimal places. Team Rank is an integer. Teams Count W1 W2 W3 W4 W5 Total WT Heaviest Tky Lightest Tky Av. WT T Rank Team 1 5 Team 2
Expert Solution
steps

Step by step

Solved in 2 steps with 6 images

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr