Question
The file named world_series_winners.txt contains a chronological list of the World Series winning teams from 1903 through 2009. (The first line in the file is
The file named world_series_winners.txt contains a chronological list of the World Series winning teams 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.)
Write a program q3.py that lets the user enter the name of a team and then displays to the screen the number of times that team has won the World Series in the time period from 1903 through 2009. Your program calls a function count_wins that takes a name of team and a handle to the file as parameter and returns how many time this teams won.
txt:
"I programed with C for 15 years, C++ for 10+ years, Java for 4 years and Python for 3 years. Through C is not an object oriented language , it's still my 1st preference"
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started