Where the follower lookup stopped
Predict the output · Medium · §13.1 Reading the red text to the end
This code prints the number of followers for each name. Predict the output without running the code.
Code
followers = {"mina": 1200, "jun": 340}
def get_followers(name):
return followers[name]
def show(name):
print("Looking up:", name)
print(name, get_followers(name))
for name in ["jun", "sora", "mina"]:
show(name)Solve this problem in your browser
Python runs in your browser and checks your answer right away. Hints and the answer are on the problem page.