baseball

baseball - elif score2 > score1: winner = team2...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
winners = open("ballgames.txt") winner = 0 for line in winners: (team1,score1,team2,score2) = line.split() if score1 > score2: winner = team1 print ('The winner was ' , (winner) , 'with' , (score1) , 'points.')
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: elif score2 > score1: winner = team2 print('The winner was ' , (winner) , 'with' , (score2) , 'points.') else: print('The game resulted in a tie') winners.close()...
View Full Document

This document was uploaded on 04/28/2011.

Ask a homework question - tutors are online