← 2023 questions

2023 / INSTAGRAM / QUESTION 4

Food account ratios

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

THE QUESTION

Finnick wants to find the inspiration from the most successful food instagram account. To do this, he wants to find the best ratio between the number of posts and the number of followers out of a few instagram accounts.

First, extract data from instagram using the Instagramy Module. Here is a resource that teaches you how to install and use this module:

Secondly, extract the number of posts and followers from the following instagram accounts:

buzzfeedtasty

milktpapi

doobydobap

Thirdly, use the formula:

ratio = number of followers / number of posts

The instagram account with the largest value as its ratio is the most successful food instagram account.

Finally, output all three ratios from the given instagram accounts and what the ratio of the most successful instagram account is.

The Instagramy module only works on Jupyter Notebook (google search it to use it)

(Even though this is an intermediate question, I decided to introduce the concept of modules as it is what takes you from intermediate to advanced. If you are struggling with modules, that's ok! You can skip this question and move on)

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

PRACTICE CHECK

Try your answer.

New illustrative snapshot, not live or historical Instagram statistics. The original question requires changing external data.

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.

Practice snapshot (followers, posts): buzzfeedtasty (12000, 60), milktpapi (9000, 60), doobydobap (15000, 50). Enter all three ratios in that order.

Reveal worked answer

Follower/post ratios

[200, 150, 300]

Most successful account

doobydobap

Divide followers by posts: 200, 150 and 300. The largest ratio is 300 for doobydobap.