Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python is the programming language. Exercise 8: Program exercise for processing records in a file Write a complete Python program including minimal comments (file name,

Python is the programming language. image text in transcribed
image text in transcribed
Exercise 8: Program exercise for processing records in a file Write a complete Python program including minimal comments (file name, your name, and problenm description) that solves the following problem with the main function: Problem Specification Your program reads a file that contains a list of player names and scores and find the best player and the score. You need to use while-loop to read all the values for this problem 1. Read a file name which contains the values to read 2. Catch any problem opening the file. If a problem occurs, print an error message and exit. 3. Using a while-loop, count the number of players and the lowest score and the player who made the lowest score 4. Close the file 5. Make sure you have a main function and there should not be any global variable or statement other than main0 function call is used. 6. Create following data file as shown below and test your program SAMPLE RUN: Enter the name of the file to open for read: golf.txt Jose Maria olazabal 73 Vijay Singh 75 Sandy Lyle 73 Mike Weir 73 Larry Mize 79 Bubba Watson 69 Bernhard Langer 70 Adam Scott 72 Fred Couples 75 There are 9 players in file golf.txt The winner of this tournament is Bubba Watson with the score of 69 Sample input: Jose Maria Olazabal 73 Vijay Singh 75 Sandy Lyle 73 Mike Weir 73 Larry Mize 79 Bubba Watson 69 Bernhard Langer 70 Adam Scott 72 Fred Couples 75

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems An Application Oriented Approach Complete Version

Authors: Michael Kifer, Arthur Bernstein, Richard Lewis

2nd Edition

0321268458, 978-0321268457

More Books

Students also viewed these Databases questions

Question

Question How is life insurance used in a DBO plan?

Answered: 1 week ago