Puzzle 9: A Hefty Bonus
Let's solve a plus operator puzzle.
We'll cover the following
Guess the output
Try to guess the output of the code below:
import pandas as pdgrades = pd.Series([61, 82, 57])bonuses = pd.Series([10, 5, 10, 10])out = grades + bonusesprint(out)
Quiz
Q
What is the output of the code above?
A)
0 71.0
1 87.0
2 67.0
3 NaN
B)
66.0
92.0
67.0
C)
71.0
87.0
67.0
D)
ValueError
Get hands-on with 1300+ tech skills courses.