python is not recognized as an internal or external command when running script

There is no python3.exe file, that is why it fails.

Try:

py

instead.

py is just a launcher for python.exe. If you have more than one python versions installed on your machine (2.x, 3.x) you can specify what version of python to launch by

py -2 or py -3

Here is what the above code is Doing:
1. It’s creating a list of numbers from 1 to 10.
2. It’s iterating through that list, and for each number in the list, it’s checking to see if the number is divisible by 2.
3. If the number is divisible by 2, it prints out the number.

Here’s what the output looks like:

2
4
6
8
10