In [ ]:
Check the result manually! If it is incorrect think about what might be the reason and correct the code. If the result is correct what is important point here we have to take care of?
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
While this task can be solved easily with loops and if-else statements, many Python coders insist that a more pythonic way would avoid such loops. See the notebook on list comprehension on one common way of avoiding loops.
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]: