Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. (50 pts) Write a function named find_supporters(). It takes **args as its only argument. It searches the supporters of a team that is specified

image text in transcribedimage text in transcribed

1. (50 pts) Write a function named find_supporters(). It takes **args as its only argument. It searches the supporters of a team that is specified by one of its attributes. The function should return the list of names that supports the specified team. def find supporters (**args) : argument names: userfile: name of the file that includes information about users teamfile: name of the file that includes information about teams supporterfile: name of the file that includes information about supporters search_type: can be one of the following strings uidt': search supporters using uidt of the teams name': search supporters using name of the team 'abb: search supporters using abbreviation of the team city: search supporters using city of the team search_value: value of the team attribute # complete this function For example x = find_supporters (userfile='names.txt', teamfile='teams.txt', \ supporterfile='supporters.txt', \ search_type='city', search_value='Istanbul') should return a list of users who support teams located in Istanbul. The list should be composed of strings with user name and surname merged into a single string. Hence x should look like x = ['Nese Onan', 'Basak Sertel', 'Uguray Cildir'] Information Consider 3 files that are given at Ninova: names.txt, teams.txt and supporters.txt. All three files contain information given in json format. The names.txt file contains list of user information. Its attributes are as follows: Attribute Type Description uid integer unique identifier for the user name string name of the user surname string surname of the user email string email of the user dob string date of birth of the user given in day.month.year format The teams.txt file contains list of football club information. Its attributes are as follows: Attribute Type Description uidt integer unique identifier for the football club name string name of the football club abb string abbreviation for the football club city string city where the football club is located The supporter.txt file contains list of users and the football club they support. Its attributes are as follows: Attribute Type Description uid integer unique identifier of the user uidt integer unique identifier of football club that user uid supports

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introductory Relational Database Design For Business With Microsoft Access

Authors: Jonathan Eckstein, Bonnie R. Schultz

1st Edition

1119329418, 978-1119329411

More Books

Students also viewed these Databases questions