Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please note that all codes should be working.... especially from Q5 to 10 Question 1 Write python program that reads the Google Play Store.txt file.

Please note that all codes should be working.... especially from Q5 to 10

Question 1

Write python program that reads the "Google Play Store.txt" file. Then create list named as "GPlist". Each item in the GPlist should present a line of the "Google Play Store.txt" file in the following format: [App;Category;Rating;Reviews;Size;Installs;Type;Price;Content Rating;Genres] Here is the first 10 items of the GPlist: [['Photo Editor & Candy Camera & Grid & ScrapBook', 'ART_AND_DESIGN', '4.1', '159', '19M', '10,000+', 'Free', '0', 'Everyone', 'Art & Design'], ['Coloring book moana', 'ART_AND_DESIGN', '3.9', '967', '14M', '500,000+', 'Free', '0', 'Everyone', 'Art & Design and Pretend Play'], ['U Launcher Lite - FREE Live Cool Themes, Hide Apps', 'ART_AND_DESIGN', '4.7', '87510', '8.7M', '5,000,000+', 'Free', '0', 'Everyone', 'Art & Design'], ['Sketch - Draw & Paint', 'ART_AND_DESIGN', '4.5', '215644', '25M', '50,000,000+', 'Free', '0', 'Teen', 'Art & Design'], ['Pixel Draw - Number Art Coloring Book', 'ART_AND_DESIGN', '4.3', '967', '2.8M', '100,000+', 'Free', '0', 'Everyone', 'Art & Design and Creativity'], ['Paper flowers instructions', 'ART_AND_DESIGN', '4.4', '167', '5.6M', '50,000+', 'Free', '0', 'Everyone', 'Art & Design'], ['Smoke Effect Photo Maker - Smoke Editor', 'ART_AND_DESIGN', '3.8', '178', '19M', '50,000+', 'Free', '0', 'Everyone', 'Art & Design'], ['Infinite Painter', 'ART_AND_DESIGN', '4.1', '36815', '29M', '1,000,000+', 'Free', '0', 'Everyone', 'Art & Design'], ['Garden Coloring Book', 'ART_AND_DESIGN', '4.4', '13791', '33M', '1,000,000+', 'Free', '0', 'Everyone', 'Art & Design'], ['Kids Paint Free - Drawing Fun', 'ART_AND_DESIGN', '4.7', '121', '3.1M', '10,000+', 'Free', '0', 'Everyone', 'Art & Design and Creativity']]

Question 2

Write python function named as "rating" that gets a list in the format of [App;Category;Rating;Reviews;Size;Installs;Type;Price;Content Rating;Genres] and returns the rating of the app. (Hint: '5' (string object) is not the same is 5 (number). That is you may need to use the syntax 'float()' in your program.) Here is a sample run: BB To answer the following questions, please download and save "Google Play Store.txt" file from . The data was scraped from iTunes App Store page. Each line contains the following information: http://localhost:8888/notebooks/Google%20Drive/DSS%20615/Sina/Exams/Exam%201/Exam%201/Exam%201.ipynb 2/6 print(rating(['Photo Editor & Candy Camera & Grid & ScrapBook', 'ART_AND _DESIGN', '4.1', '159', '19M', '10,000+', 'Free', '0', 'Everyone', 'Art & Design'])) 4.1

Question 3

Sort the GPlist based on the app rating. Here is the first 10 items of the sorted list: [['Hojiboy Tojiboyev Life Hacks', 'COMICS', '5', '15', '37M', '1,000+', 'Free', '0', 'Everyone', 'Comics'], ['American Girls Mobile Numbers', 'DATING', '5', '5', '4.4M', '1,000+', 'Free', '0', 'Mature 17+', 'Dating'], ['Awake Dating', 'DATING', '5', '2', '70M', '100+', 'Free', '0', 'Mature 17+', 'Dating'], ['SpineThe dating app', 'DATING', '5', '5', '9.3M', '500+', 'Free', '0', 'Teen', 'Dating'], ['Girls Live Talk - Free Text and Video Chat', 'DATING', '5', '6', '5.0M', '100+', 'Free', '0', 'Mature 17+', 'Dating'], ['Online Girls Chat Group', 'DATING', '5', '5', '5.0M', '100+', 'Free', '0', 'Mature 17+', 'Dating'], ['Speeding Joyride & Car Meet App', 'DATING', '5', '3', '25M', '100+', 'Free', '0', 'Mature 17+', 'Dating'], ['SUMMER SONIC app', 'EVENTS', '5', '4', '61M', '500+', 'Free', '0', 'Everyone', 'Events'], ['Prosperity', 'EVENTS', '5', '16', '2.3M', '100+', 'Free', '0', 'Everyone', 'Events'], ['Mindvalley U Tallinn 2018', 'EVENTS', '5', '1', '21M', '100+', 'Free', '0', 'Everyone', 'Events']]

Question 4

How many apps are rated 5? Here is a sample run: 269 apps are rated 5.

Question 5

Create list of unique genres from the GPlist and name this list as "Genres". Here is a sample run: ['Strategy', 'Arcade', 'Casual', 'Communication', 'Sports', 'Tools', 'Action', 'Adventure', 'Video Players & Editors', 'Racing', 'Photography', 'Personalization', 'Trivia', 'Shopping', 'Social', 'Productivity', 'Adventure and Action & Adventure', 'Simulation', 'Entertainment', 'Lifestyle', 'Role Playing', 'Weather', 'Puzzle', 'Casino', 'Puzzle and Action & Adventure', 'Maps & Navigation', 'Board', http://localhost:8888/notebooks/Google%20Drive/DSS%20615/Sina/Exams/Exam%201/Exam%201/Exam%201.ipynb 3/6 'Finance', 'Puzzle and Brain Games', 'Racing and Action & Adventure', 'Word', 'Educational and Pretend Play', 'Business', 'Card and Action & Adventure', 'Card', 'News & Magazines', 'Music', 'Travel & Local', 'Educational and Action & Adventure', 'Parenting', 'Food & Drink', 'Health & Fitness', 'Simulation and Action & Adventure', 'Action and Action & Adventure', 'Arcade and Action & Adventure', 'Books & Reference', 'House & Home', 'Entertainment and Creativity', 'Casual and Pretend Play', 'Role Playing and Action & Adventure', 'Casual and Action & Adventure', 'Education', 'Libraries & Demo', 'Casual and Creativity', 'Adventure and Education', 'Dating', 'Auto & Vehicles', 'Entertainment and Brain Games', 'Comics', 'Art & Design', 'Education and Education', 'Video Players & Editors and Creativity', 'Medical', 'Role Playing and Pretend Play', 'Role Playing and Brain Games', 'Lifestyle and Pretend Play', 'Entertainment and Music & Video', 'Strategy and Creativity', 'Entertainment and Action & Adventure', 'Educational and Education', 'Educational', 'Puzzle and Creativity', 'Board and Action & Adventure', 'Simulation and Pretend Play', 'Entertainment and Pretend Play', 'Education and Pretend Play', 'Education and Brain Games', 'Sports and Action & Adventure', 'Educational and Brain Games', 'Beauty', 'Music and Music & Video', 'Casual and Brain Games', 'Events', 'Video Players & Editors and Music & Video', 'Casual and Music & Video', 'Simulation and Education', 'Health & Fitness and Action & Adventure', 'Board and Brain Games', 'Arcade and Pretend Play', 'Strategy and Action & Adventure', 'Educational and Creativity', 'Art & Design and Creativity', 'Casual and Education', 'Education and Action & Adventure', 'Health & Fitness and Education', 'Education and Creativity', 'Education and Music & Video', 'Entertainment and Education', 'Adventure and Brain Games', 'Parenting and Education', 'Parenting and Brain Games', 'Parenting and Music & Video', 'Racing and Pretend Play', 'Strategy and Education', 'Music & Audio and Music & Video', 'Art & Design and Pretend Play', 'Travel & Local and Action & Adventure', 'Puzzle and Education', 'Card and Brain Games', 'Comics and Creativity', 'Books & Reference and Education', 'Board and Pretend Play']

Question 6

Write function "AverageRatingPerGenre" that returns the average rating of apps for a given Genre. Round the result by 2 decimals.

Here is a sample run:

print(AverageRatingPerGenre('Business'))

4.12

Question 7

Write function "AppsPerGenre" that counts the number of apps for a given Genre. Here is a sample run:

print(AppsPerGenre('Business'))

246

Question 8

Find the average rating and number of apps for each Genre. Store these statistics in a list called "RatingsPerGenre". Here is a sample run: (Genre,AppsPerGenre,AverageRatingPerGenre) [('Comics', 47, 4.13), ('Dating', 173, 3.96), ('Events', 38, 4.48), ('Libraries & Demo', 62, 4.2), ('Medical', 324, 4.18), ('Tools', 634, 4.01), ('Personalization', 280, 4.32), ('Books & Reference', 144, 4.32), ('Lifestyle', 279, 4.09), ('Social', 177, 4.26), ('Business', 246, 4.12), ('News & Magazines', 169, 4.14), ('Photography', 236, 4.15), ('Shopping', 179, 4.23), ('Education', 417, 4.3), ('Entertainment', 448, 4.09), ('Education and Education', 41, 4.32), ('Food & Drink', 84, 4.1), ('Arcade', 186, 4.3), ('Travel & Local', 159, 4.04), ('Finance', 266, 4.11), ('Health & Fitness', 223, 4.22), ('Communication', 211, 4.1), ('Productivity', 235, 4.14), ('Puzzle', 108, 4.36), ('Trivia', 27, 4.03), ('Sports', 261, 4.22), ('Parenting', 35, 4.39), ('Art & Design', 53, 4.36), ('Action', 322, 4.26), ('Racing', 83, 4.15), ('Casual', 160, 4.14), ('Simulation', 182, 4.14), ('Auto & Vehicles', 63, 4.15), ('Beauty', 37, 4.29), ('Education and Pretend Play', 22, 4.4), ('Card', 39, 4.05), ('Video Players & Editors', 115, 4.03), ('Maps & Navigation', 95, 4.01), ('Word', 24, 4.43), ('Comics and Creativity', 1, 4.8), ('House & Home', 56, 4.16), ('Entertainment and Brain Games', 6, 4.33), ('Simulation and Pretend Play', 3, 4.47), ('Casual and Brain Games', 13, 4.47), ('Board and Brain Games', 14, 4.34), ('Board and Pretend Play', 1, 4.8), ('Parenting and Music & Video', 5, 4.42), ('Weather', 51, 4.24), ('Role Playing', 103, 4.27), ('Educational and Education', 33, 4.23), ('Strategy', 96, 4.25), ('Board', 38, 4.3), ('Art & Design and Creativity', 6, 4.48), ('Simulation and Action & Adventure', 11, 4.42), ('Arcade and Action & Adventure', 13, 4.32), ('Entertainment and Music & Video', 16, 4.11), ('Health & Fitness and Education', 1, 4.7), ('Casino', 32, 4.27), ('Role Playing and Action & Adventure', 5, 4.44), ('Casual and Pretend Play', 30, 4.19), ('Educational', 31, 3.88), ('Entertainment and Creativity', 2, 4.65), ('Casual and Creativity', 7, 4.31), ('Music', 15, 4.12), ('Books & Reference and Education', 2, 4.2), ('Music and Music & Video', 3, 4.53), ('Puzzle and Brain Games', 18, 4.37), ('Adventure', 68, 4.18), ('Educational and Brain Games', 6, 4.22), ('Action and Action & Adventure', 16, 4.3), ('Strategy and Action & Adventure', 2, 4.6), ('Adventure and Brain Games', 1, 4.6), ('Puzzle and Education', 1, 4.6), ('Educational and Pretend Play', 18, 4.24), ('Education and Creativity', 5, 4.4), ('Adventure and Action & Adventure', 13, 4.42), ('Simulation and Education', 3, 4.37), ('Arcade and Pretend Play', 1, 4.5), ('Racing and Action & Adventure', 14, 4.31), ('Casual and Action & Adventure', 15, 4.19), ('Strategy and Education', 1, 4.5), ('Role Playing and Pretend Play', 5, 4.02), ('Racing and Pretend Play', 1, 4.5), ('Education and Action & Adventure', 6, 4.3), ('Education and Brain Games', 1, 4.4), ('Educational and Creativity', 5, 3.96), ('Card and Brain Games', 1, 4.4), ('Entertainment and Education', 1, 4.4), ('Casual and Education', 3, 4.27), ('Puzzle and Creativity', 2, 4.4), ('Education and Music & Video', 3, 4.2), ('Educational and Action & Adventure', 4, 4.2), ('Strategy and Creativity', 1, 4.4), ('Entertainment and Action & Adventure', 3, 4.2), ('Puzzle and Action & Adventure', 5, 4.3), ('Music & Audio and Music & Video', 1, 4.3), ('Card and Action & Adventure', 2, 4.3), ('Sports and Action & Adventure', 2, 4.2), ('Role Playing and Brain Games', 1, 4.3), ('Adventure and Education', 2, 4.1), ('Board and Action & Adventure', 3, 4.03), http://localhost:8888/notebooks/Google%20Drive/DSS%20615/Sina/Exams/Exam%201/Exam%201/Exam%201.ipynb 5/6 ('Casual and Music & Video', 2, 4.1), ('Entertainment and Pretend Play', 2, 4.0), ('Video Players & Editors and Creativity', 2, 4.1), ('Travel & Local and Action & Adventure', 1, 4.1), ('Lifestyle and Pretend Play', 1, 4.0), ('Parenting and Education', 3, 3.87), ('Video Players & Editors and Music & Video', 1, 4.0), ('Art & Design and Pretend Play', 2, 3.9), ('Health & Fitness and Action & Adventure', 1, 3.9), ('Parenting and Brain Games', 1, 3.8)]

Question 9

Sort the RatingsPerGenre list based on the number of apps per genre. Here is a sample run: [('Tools', 634, 4.01), ('Entertainment', 448, 4.09), ('Education', 417, 4.3), ('Medical', 324, 4.18), ('Action', 322, 4.26), ('Personalization', 280, 4.32), ('Lifestyle', 279, 4.09), ('Finance', 266, 4.11), ('Sports', 261, 4.22), ('Business', 246, 4.12), ('Photography', 236, 4.15), ('Productivity', 235, 4.14), ('Health & Fitness', 223, 4.22), ('Communication', 211, 4.1), ('Arcade', 186, 4.3), ('Simulation', 182, 4.14), ('Shopping', 179, 4.23), ('Social', 177, 4.26), ('Dating', 173, 3.96), ('News & Magazines', 169, 4.14), ('Casual', 160, 4.14), ('Travel & Local', 159, 4.04), ('Books & Reference', 144, 4.32), ('Video Players & Editors', 115, 4.03), ('Puzzle', 108, 4.36), ('Role Playing', 103, 4.27), ('Strategy', 96, 4.25), ('Maps & Navigation', 95, 4.01), ('Food & Drink', 84, 4.1), ('Racing', 83, 4.15), ('Adventure', 68, 4.18), ('Auto & Vehicles', 63, 4.15), ('Libraries & Demo', 62, 4.2), ('House & Home', 56, 4.16), ('Art & Design', 53, 4.36), ('Weather', 51, 4.24), ('Comics', 47, 4.13), ('Education and Education', 41, 4.32), ('Card', 39, 4.05), ('Events', 38, 4.48), ('Board', 38, 4.3), ('Beauty', 37, 4.29), ('Parenting', 35, 4.39), ('Educational and Education', 33, 4.23), ('Casino', 32, 4.27), ('Educational', 31, 3.88), ('Casual and Pretend Play', 30, 4.19), ('Trivia', 27, 4.03), ('Word', 24, 4.43), ('Education and Pretend Play', 22, 4.4), ('Puzzle and Brain Games', 18, 4.37), ('Educational and Pretend Play', 18, 4.24), ('Action and Action & Adventure', 16, 4.3), ('Entertainment and Music & Video', 16, 4.11), ('Casual and Action & Adventure', 15, 4.19), ('Music', 15, 4.12), ('Board and Brain Games', 14, 4.34), ('Racing and Action & Adventure', 14, 4.31), ('Casual and Brain Games', 13, 4.47), ('Adventure and Action & Adventure', 13, 4.42), ('Arcade and Action & Adventure', 13, 4.32), ('Simulation and Action & Adventure', 11, 4.42), ('Casual and Creativity', 7, 4.31), ('Art & Design and Creativity', 6, 4.48), ('Entertainment and Brain Games', 6, 4.33), ('Education and Action & Adventure', 6, 4.3), ('Educational and Brain Games', 6, 4.22), ('Role Playing and Action & Adventure', 5, 4.44), ('Parenting and Music & Video', 5, 4.42), ('Education and Creativity', 5, 4.4), ('Puzzle and Action & Adventure', 5, 4.3), ('Role Playing and Pretend Play', 5, 4.02), ('Educational and Creativity', 5, 3.96), ('Educational and Action & Adventure', 4, 4.2), ('Music and Music & Video', 3, 4.53), ('Simulation and Pretend Play', 3, 4.47), ('Simulation and Education', 3, 4.37), ('Casual and Education', 3, 4.27), ('Education and Music & Video', 3, 4.2), ('Entertainment and Action & Adventure', 3, 4.2), ('Board and Action & Adventure', 3, 4.03), ('Parenting and Education', 3, 3.87), ('Entertainment and Creativity', 2, 4.65), ('Strategy and Action & Adventure', 2, 4.6), ('Puzzle and Creativity', 2, 4.4), ('Card and Action & Adventure', 2, 4.3), ('Books & Reference and Education', 2, 4.2), ('Sports and Action & Adventure', 2, 4.2), ('Adventure and Education', 2, 4.1), ('Casual and Music & Video', 2, 4.1), ('Video Players & Editors and Creativity', 2, 4.1), ('Entertainment and Pretend Play', 2, 4.0), ('Art & Design and Pretend Play', 2, 3.9), ('Comics and Creativity', 1, 4.8), ('Board and Pretend Play', 1, 4.8), ('Health & Fitness and Education', 1, 4.7), ('Adventure and Brain Games', 1, 4.6), ('Puzzle and Education', 1, 4.6), ('Arcade and Pretend Play', 1, 4.5), ('Strategy and Education', 1, 4.5), ('Racing and Pretend Play', 1, 4.5), ('Education and Brain Games', 1, 4.4), ('Card and Brain Games', 1, 4.4), ('Entertainment and Education', 1, 4.4), ('Strategy and Creativity', 1, 4.4), ('Music & Audio and Music & Video', 1, 4.3), ('Role Playing and Brain Games', 1, 4.3), ('Travel & Local and Action & Adventure', 1, 4.1), ('Lifestyle and Pretend Play', 1, 4.0), ('Video Players & Editors and Music & Video', 1, 4.0), ('Health & Fitness and Action & Adventure', 1, 3.9), ('Parenting and Brain Games', 1, 3.8)]

Question 10

Some Genres in the Genres list are combination of different genres. For instance, "Simulation and Action & Adventure" is combination of 3 genres Simulation, Action and Adventure. Write a program that return all unique genres in the Genres list. Hint: note that words in the Genre are saparated by space (' '). Additionally, note that 'and' and '&' are not considered as a genre. Here is a sample run: ['Comics', 'Dating', 'Events', 'Libraries', 'Demo', 'Medical', 'Tools', 'Personalization', 'Books', 'Reference', 'Lifestyle', 'Social', 'Business', 'News', 'Magazines', 'Photography', 'Shopping', 'Education', 'Entertainment', 'Food', 'Drink', 'Arcade', 'Travel', 'Local', 'Finance', 'Health', 'Fitness', 'Communication', 'Productivity', 'Puzzle', 'Trivia', 'Sports', 'Parenting', 'Art', 'Design', 'Action', 'Racing', 'Casual', 'Simulation', 'Auto', 'Vehicles', 'Beauty', 'Pretend', 'Play', 'Card', 'Video', 'Players', 'Editors', 'Maps', 'Navigation', 'Word', 'Creativity', 'House', 'Home', 'Brain', 'Games', 'Board', 'Music', 'Weather', 'Role', 'Playing', 'Educational', 'Strategy', 'Adventure', 'Casino', 'Audio']

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

Calculus Early Transcendentals

Authors: James Stewart, Daniel K. Clegg, Saleem Watson, Lothar Redlin

9th Edition

1337613924, 978-1337613927

More Books

Students also viewed these Mathematics questions