Skip to content

Commit a40776f

Browse files
committed
improved text on for loop
1 parent c39c48d commit a40776f

File tree

6 files changed

+143
-79
lines changed

6 files changed

+143
-79
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,11 @@ Die Slides zum Kurs in deutscher Sprache können unter <https://thomasweise.gith
4141
16. [Gleichheit und Identität](https://thomasweise.github.io/programmingWithPythonSlidesDE/16_gleichheit_und_identität.pdf)
4242
17. [Listen](https://thomasweise.github.io/programmingWithPythonSlidesDE/17_listen.pdf)
4343
18. [Zwischenspiel: Der Linter Ruff](https://thomasweise.github.io/programmingWithPythonSlidesDE/18_ruff.pdf)
44-
19. [Tuples](https://thomasweise.github.io/programmingWithPythonSlidesDE/19_tuples.pdf)
44+
19. [Tupels](https://thomasweise.github.io/programmingWithPythonSlidesDE/19_tupels.pdf)
4545
20. [Mengen](https://thomasweise.github.io/programmingWithPythonSlidesDE/20_mengen.pdf)
4646
21. [Dictionaries bzw. Hash Maps](https://thomasweise.github.io/programmingWithPythonSlidesDE/21_dictionaries.pdf)
4747
22. [Alternativen mit `if`](https://thomasweise.github.io/programmingWithPythonSlidesDE/22_alternativen_mit_if.pdf)
48+
23. [Schleifen mit `for`](https://thomasweise.github.io/programmingWithPythonSlidesDE/23_schleifen_mit_for.pdf)
4849

4950

5051
### 2.3. The Slides in English

text/main/basics/variables/assignment/assignment.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
Eventually, the \python\ interpreter could free the corresponding memory to use it for something else.
159159
Doing \pythonil{print(f"int_var is now \{int_var\}.")} will print \textil{int_var is now 4.} to the \pgls{stdout}.
160160

161-
Ofcourse, we can have multiple variables.
161+
Of course, we can have multiple variables.
162162
The command \pythonil{float_var = 3.5} creates a variable named \pythonil{float_var}.
163163
It also allocates a piece of memory, writes the floating point value \pythonil{3.5} into it, and lets \pythonil{float_var} point to that piece of memory, as illustrated in \cref{fig:variable:assignment3}.
164164
We can use this variable in an \pgls{fstring}\pythonIdx{f-string}\pythonIdx{str!f} as well:

text/main/basics/variables/multiAndSwap/multiAndSwap.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
A \python\ program assigning multiple values to multiple variables and using the same method to swap variable values.}{}%
66
%
77
Let us return to the topic of variables and assignments.
8-
In \python, we can assign values to multiple variables at once~(ofcourse, always exactly one value to one variable).
8+
In \python, we can assign values to multiple variables at once~(of course, always exactly one value to one variable).
99
In this case, we separate both the variable names and the values with commas.
1010
The first line~\pythonil{a, b = 5, 10}\pythonIdx{=!multiple}\pythonIdx{,} in \cref{lst:variables:multi_and_swap} is equivalent to the two lines~\pythonil{a = 5} and~\pythonil{b = 10}.
1111
It assigns the value~\pythonil{5} to the variable~\pythonil{a} and the value~\pythonil{10} to the variable~\pythonil{b}.

text/main/basics/variables/typesAndTypeHints/typesAndTypeHints.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@
150150
The results of static type checking with \mypy\ of the program \textil{variable_types.py} given in \cref{lst:variables:types}. %
151151
(This is actually output generated by the script~\cref{lst:bash:mypy} on \cpageref{lst:bash:mypy}.)}%
152152
%
153-
A first step to avoiding any type-related errors in programs is, ofcourse, careful programming.
153+
A first step to avoiding any type-related errors in programs is, of course, careful programming.
154154
The second step is to use tools that check whether your program code contains ambiguities or errors.
155155
In languages like \pgls{C} and \pgls{Java}, the compiler will take care of that for you to a some extend, because these languages are statically and strongly typed.
156156

0 commit comments

Comments
 (0)