|
174 | 174 | % |
175 | 175 | This first program is stored in a file named~\textil{assignment.py}. |
176 | 176 | To execute it, you have two choices: |
177 | | -You can do this in the \pgls{terminal} or using \pycharm. |
178 | | - |
| 177 | +You can do this in the \pgls{terminal} or using \pycharm.% |
| 178 | +% |
| 179 | +\begin{sloppypar}% |
179 | 180 | Under \ubuntu\ \linux, you open the \pgls{terminal} by pressing \ubuntuTerminal, under \microsoftWindows\ you instead \windowsTerminal. |
180 | 181 | Then you enter the folder where the program \textil{assignment.py} is stored using the command~\bashil{cd}. |
181 | | -Then you would execute the command~\bashil{python3 assignment.py} to run the \python\ interpreter, as illustrated in \cref{fig:assignmentTerminal}. |
182 | | - |
| 182 | +Then you would execute the command~\bashil{python3 assignment.py} to run the \python\ interpreter, as illustrated in \cref{fig:assignmentTerminal}.% |
| 183 | +\end{sloppypar}% |
| 184 | +% |
183 | 185 | Alternatively, you can open the program file in \pycharm\ \pgls{ide}, as sketched in \cref{fig:assignmentPyCharm1}. |
184 | 186 | You would then right-click on the file \textil{assignment.py} in the project tree view. |
185 | 187 | In the popup-menu that opens, you would left-click on \menu{Run `assignment'} as shown in \cref{fig:assignmentPyCharm2}. |
|
374 | 376 | Alternatively, if you are using \pycharm, you can open the program file \programUrl{variables:pi_liu_hui} as shown in \cref{fig:liuHuiPiPyCharm1}. |
375 | 377 | You can right-click on this program in the project tree view and, in the pop-up menu that appears, left-click on \menu{Run `pi\_liu\_hui'}, as sketched in \cref{fig:liuHuiPiPyCharm2}. |
376 | 378 | You can instead also press \keys{\ctrl+\shift+F10} in the editor window. |
377 | | -Eithre way, the program will be executed and its output appears~(see~\cref{fig:liuHuiPiPyCharm3}). |
| 379 | +Either way, the program will be executed and its output appears~(see~\cref{fig:liuHuiPiPyCharm3}). |
378 | 380 | And again it is identical to what we have shown in \cref{exec:variables:pi_liu_hui}. |
379 | 381 | Therefore, in the future, we will only very sporadically add such screenshots. |
380 | 382 | Instead, we will usually only print code and output pairs like~\cref{lst:variables:pi_liu_hui,exec:variables:pi_liu_hui}.% |
|
0 commit comments