Python Project File 2nd Term
Python Project File 2nd Term
To write a python program to print sum of tuple
elements.
To Create a Dictionary
Repeatedly ask the user to enter a team name and how many games the team
has won and how many they lost. Store this information in a dictionary where
the keys are the team names and the values are lists of the form [wins,
losses].
Using the dictionary created above, allow the user to enter a team name and
print out the team's winning percentage.
Using the dictionary, create a list whose entries are the number of wins of
each team.
Using the dictionary, create a list of all those teams that have winning
records.
Create a dictionary whose keys are month names and whose values are the
number of days in the corresponding months.
(a) Ask the user to enter a month name and use the dictionary to tell how
many days are in the month.
(b) Print out all of the keys in alphabetical order.
(c) Print out all of the months with 31 days.
(d) Print out the (key-value) pairs sorted by the number of days in each
month.