diff --git a/exercises/02450Toolbox_Python/Scripts/check_installation.py b/exercises/02450Toolbox_Python/Scripts/check_installation.py index 0247d0db2cae16a21a88c0b9e7ff6072b025c95a..6940c236be270b85e923a284ba2975317d98528a 100644 --- a/exercises/02450Toolbox_Python/Scripts/check_installation.py +++ b/exercises/02450Toolbox_Python/Scripts/check_installation.py @@ -16,7 +16,7 @@ print('Current working directory {}.'.format(pathlib.Path().resolve())) print('') print('The numpy version is {}.'.format(np.__version__)) print('The scikit-learn version is {}.'.format(sklearn.__version__)) -print('The torch version is{}.'.format(torch.__version__)) +print('The torch version is {}.'.format(torch.__version__)) """ Check that the course specific tools can be imported @@ -25,7 +25,7 @@ import dtuimldmtools print('The dtuimldmtools package {}.'.format(dtuimldmtools)) """ -Check that pandas can be imported (use in ex1) +Check that pandas can be imported (used in ex1) Note_ If this fails you need to install panda manually https://pandas.pydata.org/docs/getting_started/install.html diff --git a/exercises/02450Toolbox_Python/Scripts/ex0_4_5.py b/exercises/02450Toolbox_Python/Scripts/ex0_4_5.py index 0884bcf6b949d43eb5d2b3371eb10d117d975ed3..3e55c2079b502d70554bd6165883a0047928f3a8 100644 --- a/exercises/02450Toolbox_Python/Scripts/ex0_4_5.py +++ b/exercises/02450Toolbox_Python/Scripts/ex0_4_5.py @@ -18,9 +18,10 @@ x = np.asmatrix(np.arange(1, 6)) y = np.asmatrix(np.arange(2, 12, 2)) # Again, have a look at them by typing 'x' and 'y' in the console -# Try using the * operator just as before now: +# Try using the * operator just as before now (this should not work!): x * y -# You should now get an error - try to explain why. +# You should now get an error - try to explain why +# (comment or remove the line to run the rest of the script). # array and matrix are two data structures added by NumPy package to the list of # basic data structures in Python (lists, tuples, sets). We shall use both diff --git a/exercises/02450Toolbox_Python/Scripts/ex0_5_1.py b/exercises/02450Toolbox_Python/Scripts/ex0_5_1.py index 6cb5ce885e80e6eca466650c3a6ee45db66da877..1fcf0ad6306a00ac8fb56619fc82eea0a5c30d51 100644 --- a/exercises/02450Toolbox_Python/Scripts/ex0_5_1.py +++ b/exercises/02450Toolbox_Python/Scripts/ex0_5_1.py @@ -5,9 +5,12 @@ import numpy as np x = np.arange(0, 1, 0.1) f = np.exp(x) + plt.figure(1) plt.plot(x, f) plt.xlabel("x") plt.ylabel("f(x)=exp(x)") plt.title("The exponential function") plt.show() + +# %%