← 2023 questions

2023 / TIKTOK / QUESTION 17

Video predictions

Try the question in your own editor, then check your output below.

THE QUESTION

Sofea is a content creator. She wants to find out how her videos are doing. Create a summary of her current videos and use it to predict how her next videos will do based on the tags and like percentage. The summary should include: the total views, total likes and calculate the percentage of how many people like the video for each video. The summary should also include the collective view count of each video, average like count and average like percentage. You should sort the video ideas by order of predicted success (in terms of like percentage)

(Hint: Starter code can be sorted into a regular array or a numpy array)

Starter Code:

Videos :
“Bench press PR”, tags: #gym #pr, likes: 13.6k, views: 17k
“Leg day L”, tags: #gym #funny, likes: 21.6k, views: 24k
“Travel vlog: Japan”, tags: #travel #japan, likes: 6.3k, views: 9k
“5 types of gamers”, tags: #gaming #funny, likes: 17.1k views: 19k
“Battle station tour”, tags: #gaming #pcsetup, likes: 7.7k, views: 11k
“Ego lifter L”, tags: #gym #funny, likes: 23.4k views: 26k
“1v5 clutch”, tags: #gaming #clips, likes: 8.4k, views: 12k
“Squat PR” tags: #gym #pr, likes: 15.2k, views: 19k
Video Ideas :
“Deadlift PR” topics: gym, pr
“5 types of people at the gym” topics: gym, funny
“Travel vlog: Switzerland” topics: travel,switzerland
“Ranking up to plat” topics: gaming

Question by Ariz. Source: Girls In Code SEA — Behind the Screens, 2023, slide 33.

PRACTICE CHECK

Try your answer.

This checks the numeric summary. The original question does not define a prediction model, so predicted rankings are not graded.

Run your program in your own editor, then paste its output below. This checks the stated output or checkpoint; it does not assess your full program. Practice attempts do not affect competition scores.

Enter the eight like percentages in the order of the listed videos (numbers only, without %).

Enter total views, average likes, and the arithmetic mean of the eight like percentages.

Reveal worked answer

Like percentages

[80.0, 90.0, 70.0, 90.0, 70.0, 90.0, 70.0, 80.0]

Summary

[137000, 14162.5, 80.0]

For each video, percentage = 100 × likes/views. Sum views and divide total likes by 8. Average the eight percentages.