Write a program that uses a while loop to store goals and assists for Lightning players in a text file called player_data.txt. The program should prompt the user for player names, goals, and assists as shown below. Enter data for at least five players. You can make up the names and data. Each datum should be stored on its own line in the file.
Python Question #6
Two programs are required and pseudocode is needed for each step
program6_1.py
Write a
Sample Output (see 6_1.png)
program6_2.py
This 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).
Sample Output (see image 6_2.png)
![Input player name or Enter to quit Stamkos
Enter goals scored by Stamkos 35
Enter assists scored by this player 38
Input player name or Enter to quit Maroon
Enter goals scored by Maroon 29
Enter assists scored by this player 33
Input player name or Enter to quit Point
Enter goals scored by Point 50
Enter assists scored by this player 55
Input player name or Enter to quit Kucherov
Enter goals scored by Kucherov 55
Enter assists scored by this player 65
Input player name or Enter to quit Killorn
Enter goals scored by Killorn 33
Enter assists scored by this player 40
Input player name or Enter to quit](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F098cc80e-1667-4a39-bf33-ff7a640d05d4%2F21eca420-3492-4972-b18c-97b64a14cdaf%2F1rzza3w_processed.png&w=3840&q=75)
![PLAYER
GOALS ASSISTS TOTAL
Stamkos
35
38
73
Maroon
29
33
62
Point
50
55
105
Kucherov
55
65
120
Killorn
33
40
73
Kucherov is top scorer with 120 points](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F098cc80e-1667-4a39-bf33-ff7a640d05d4%2F21eca420-3492-4972-b18c-97b64a14cdaf%2Fkhgobqm_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 4 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)