August 2021
Beginner to intermediate
112 pages
1h 29m
English
| Puzzle 12 | Multiplying |
| | import pandas as pd |
| | |
| | v = pd.Series([.1, 1., 1.1]) |
| | out = v * v |
| | expected = pd.Series([.01, 1., 1.21]) |
| | if (out == expected).all(): |
| | print('Math rocks!') |
| | else: |
| | print('Please reinstall universe & reboot.') |
Guess the Output | |
|---|---|
|
|
Try to guess what the output is before moving to the next page. |
This code will print: Please reinstall universe & reboot.
out == expected returns a Boolean pandas.Series
Read now
Unlock full access