If you have downloaded the source code you will find a file named WorldSeriesWinners. txt in the

Question:

If you have downloaded the source code you will find a file named WorldSeriesWinners. txt in the Chapter 07 folder. This file 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 the World Series was not played in 1904 or 1994.)

Write a program that lets the user enter the name of a team, then displays the number of times that team has won the World Series in the time period from 1903 through 2009.


Chapter 07 folder

Tip: Read the contents of the WorldSeriesWinners.txt file into a list. When the user enters the name of a team, the program should step through the list, counting the number of times the selected team appears.

P.S solve question using functions

def main():

code

main()

Starting Out with Python Tony Gaddis 4th edition

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  answer-question
Question Posted: