Skip to content

Instantly share code, notes, and snippets.

@freality
Created April 19, 2018 01:14
Show Gist options
  • Save freality/23d46972925d54b30e81315f6b177915 to your computer and use it in GitHub Desktop.
Save freality/23d46972925d54b30e81315f6b177915 to your computer and use it in GitHub Desktop.
def print_scoreboard(home_team, home_score, away_team, away_score, inning, inning_number, balls, strikes, outs):
print('Game Scoreboard:')
print('Home: {home_team} - {home_score}'.format(home_team=home_team, home_score=home_score))
print('Away: {away_team} - {away_score}'.format(away_team=away_team, away_score=away_score))
print('Inning: {inning_number}/{inning}'.format(inning=inning, inning_number=inning_number))
print('Balls: {balls} / Strikes: {strikes} / Outs {outs}'.format(balls=balls, strikes=strikes, outs=outs))
inning = 'bottom'
inning_number = 7
balls = 1
strikes = 2
outs = 2
home_team = 'Upper Marlboro Giants'
home_score = 10
away_team = 'Rockville Snails'
away_score = 3
print_scoreboard(home_team, home_score, away_team, away_score, inning, inning_number, balls, strikes, outs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment