Python Assignment - Day 6
Python Assignment - Day 6
Techademy
CONTENTS
1 Duration .......................................................................................................................................... 2
2 Problem Statements ....................................................................................................................... 2
2.1 Task 1: Extract players ............................................................................................................ 2
2.2 Task 2: Calculate scores ......................................................................................................... 2
2.3 Task 3: Shortest and longest words…………………………………………………………………………………….2
1
1 DURATION
2 Hours
2 PROBLEM STATEMENTS
You work at a sports club. The following sets contain the names of players registered to
play different sports:
How can you obtain a set that includes the players that are only registered to play
basketball (i.e. not registered for football or volleyball)?
Three friends are playing a game, where each player has three rounds to score. At the end, the
player whose total score (i.e. the sum of each round) is the highest wins. Consider the scores below
(formatted as a list of tuples):
Create a dictionary where each player is represented by the dictionary key and the corresponding
total score is the dictionary value.
Input a sequence of words from the user, and output the shortest and longest word in the sequence
Output:
Shortest: cat
Longest: apple