Question: do the q by python and take input from Q python Q Pro Kabaddi Season 8 Pro Kabaddi Season 8 is currently underway. The tournament

 do the q by python and take input from Q python

Q Pro Kabaddi Season 8 Pro Kabaddi Season 8 is currently underway.

The tournament is halfway through; the team point details are stored in

do the q by python and take input from Q python Q

Pro Kabaddi Season 8 Pro Kabaddi Season 8 is currently underway. The tournament is halfway through; the team point details are stored in a file[Name of the file is: kabaddi] and given to you. You have to build a python application that will be explained later to retrieve the details based on the user query/input. The input file(kabaddi) looks like Teams GP W LDPD Dabang Delhi 8 512 35 Patna Pirates 7 5 11 30 Bengaluru Bulls 8 5 2 1 10 Tamil Thalaivas 8 314 27 U Mumba 7313 31 Pink Panthers 8 440-14 UP Yoddha 8 2 4 2-2 Haryana Steelers 8 341-30 Bengal Warriors 8 350-37 Puneri Paltan 8 3 5 0-29 Gujarat Giants 7 142-6 Telugu Titans 7052-15 Column Name Teams - Team's Name - GP - Games Played W - Win L- Lose D - Draw PD - Points difference PD - Points difference i) You have to read the kabaddi file and compute the points based on the given formula. Pts = Win * 5+ Lose * (-1) + Draw * 2 For example U Mumba points will be calculated as Pts = 3* 5+1*-1 + 3 * 2 = 15 - 1 + 6 = 20 Telugu Titans points will be calculated as Pts = 0 * 5+ 5*-1 + 2 + 2 = 0 - 5+ 4 = -1 Note: Must use a function called pointCalulation() to compute and return the points ii) Create a dictionary called "kabaddiseason8", with a key as "teamName," the calculated point is associated with each key. iii) Get the search items from the user and display the results based on the search items. The search item format is, Keyword Column_name Value Column_name is either GP, W, L, D or PD and PTS [PTS - Calculated points will be stored in kabaddiseason8 dictionary as per the previous questions] Keyword must be either GT( greater than ), GTE greater than or equal ), LT (less than), LTE (less than or equal ), EQ (Equal) Value - Integer Number Example 1. Input: As per the search item format. GTE W 5 # Teams won greater than or equals five matches Output: # Display the team's Name - Search to be applied in the file. Dabang Delhi Patna Pirates Bengaluru Bulls Example 2. Bengaluru Bulls Example 2. Input: As per the search item format. LT PTS 1 # Team's point, which is less than one. Output: # Display the team's Name - Search to be applied in the kabaddiseason8 dictionary. Telugu Titans Example 3. Input: As per the search item format. EQ PD 30 # Teams points difference equals 30 Output: # Display the team's Name - Search to be applied in the file. Patna Pirates Example 4. Input: As per the search item format. GTD 3 # Teams draw more than 3 matches Output: # Display the team's Name - Search to be applied in the file. Tamil Thalaivas Example 5. Input: As per the search item format. EQ W 6 # Teams won six matches. Output: # Display the team's Name - Search to be applied in the file. No records found Input Output

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!