Kernel: Python 3 (system-wide)
This is an algorithm that sums the values 1, 2, 3, 4, 5 in two ways: using the for loop and using the while loop.
First, we use the for loop method:
In [25]:
Out[25]:
15
Here's a way using the while loop:
In [26]:
Out[26]:
15