The following is just a reminder:
- You can navigate to any folder code with:
cd <folder>
- up a directory:
cd ..
- You can list files in a folder with
ls
- You can run your code, if you are in the same folder as the file, with:
python3 <filename.py>
You can cycle through previous commands with your
up arrow
. This way you do not have to keep typing in the commands to run the code.
ch01
> exercises
touch data.py
data.py
Write Python code that evaluates the following numerical expressions and prints the result. Try to determine what the result should be before running your code:
10 * 5
10 ** 2
15 / 10
15 // 10
-15 // 10
15 % 10
10 % 15
10 % 10
0 % 10
10 / 15