<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://staging.moocwiki.org/index.php?action=history&amp;feed=atom&amp;title=English%3AProgramming_with_Python</id>
	<title>English:Programming with Python - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://staging.moocwiki.org/index.php?action=history&amp;feed=atom&amp;title=English%3AProgramming_with_Python"/>
	<link rel="alternate" type="text/html" href="https://staging.moocwiki.org/index.php?title=English:Programming_with_Python&amp;action=history"/>
	<updated>2026-09-13T15:33:37Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in MOOCsWiki Staging</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://staging.moocwiki.org/index.php?title=English:Programming_with_Python&amp;diff=49045&amp;oldid=prev</id>
		<title>Glanz: aiMOOC über GPT aiMOOC Action erstellt</title>
		<link rel="alternate" type="text/html" href="https://staging.moocwiki.org/index.php?title=English:Programming_with_Python&amp;diff=49045&amp;oldid=prev"/>
		<updated>2026-09-01T05:10:41Z</updated>

		<summary type="html">&lt;p&gt;aiMOOC über GPT aiMOOC Action erstellt&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{T}}&lt;br /&gt;
[[Category:English]]&lt;br /&gt;
[[Category:Programming with Python]]&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Programming with Python&amp;#039;&amp;#039;&amp;#039; is a university-level aiMOOC about computational thinking, software construction, and problem solving with [[English:Python (programming language)|Python]]. You will learn to design algorithms, express them in readable Python, select suitable data structures, build reusable functions, work with files and modules, test programs, and justify design decisions.&lt;br /&gt;
&lt;br /&gt;
Python is used in education, science, data analysis, automation, web development, and artificial intelligence. Its readable syntax makes it well suited to learning core ideas such as state, control flow, abstraction, data structures, modularity, and testing.&lt;br /&gt;
&lt;br /&gt;
[[File:Python-logo-notext.svg|500px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
Python was created by [[English:Guido van Rossum|Guido van Rossum]] and is developed by an international community. Language changes are discussed through [[English:Python Enhancement Proposal|Python Enhancement Proposals]].&lt;br /&gt;
&lt;br /&gt;
[[File:Guido van Rossum 2006.jpg|500px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|https://www.youtube.com/watch?v=xAcTmDO6NTI|500|center}}&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
== Learning Goals ==&lt;br /&gt;
&lt;br /&gt;
By the end of the course, you should be able to write and explain Python programs, use conditionals and loops, define functions, work with lists, tuples, sets, and dictionaries, organize code into modules, read and write files, use classes when appropriate, create automated tests, and improve code for clarity and maintainability.&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Working Environment and First Programs =&lt;br /&gt;
&lt;br /&gt;
You can use Python interactively, run scripts from a terminal, or work in an integrated development environment. [[English:Jupyter Notebook|Jupyter notebooks]] are common in universities because they combine executable code, explanation, equations, and output in one document.&lt;br /&gt;
&lt;br /&gt;
[[File:Jupyter Notebook.png|500px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
course = &amp;quot;Programming with Python&amp;quot;&lt;br /&gt;
students = 24&lt;br /&gt;
message = f&amp;quot;{course}: {students} students&amp;quot;&lt;br /&gt;
print(message)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A variable name refers to a Python object. Assignment binds a name to a value. Common built-in types include &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;float&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;bool&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;str&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|https://www.youtube.com/watch?v=JP7ITIXGpHk|500|center}}&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Expressions and Decisions =&lt;br /&gt;
&lt;br /&gt;
Expressions produce values. Arithmetic operators include &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;//&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;. The built-in &amp;lt;code&amp;gt;pow&amp;lt;/code&amp;gt; function performs exponentiation. Comparison operators produce Boolean values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
temperature = 21.5&lt;br /&gt;
is_warm = temperature &amp;gt;= 20.0&lt;br /&gt;
print(is_warm)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An &amp;lt;code&amp;gt;if&amp;lt;/code&amp;gt; statement selects a branch according to a condition.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
score = 78&lt;br /&gt;
&lt;br /&gt;
if score &amp;gt;= 90:&lt;br /&gt;
    grade = &amp;quot;excellent&amp;quot;&lt;br /&gt;
elif score &amp;gt;= 60:&lt;br /&gt;
    grade = &amp;quot;pass&amp;quot;&lt;br /&gt;
else:&lt;br /&gt;
    grade = &amp;quot;revise&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print(grade)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Loops and Iteration =&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;code&amp;gt;for&amp;lt;/code&amp;gt; loop visits items from an iterable. A &amp;lt;code&amp;gt;while&amp;lt;/code&amp;gt; loop repeats while a condition remains true. Use the construct that makes the stopping rule easiest to understand.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
values = [12, 7, 19, 4]&lt;br /&gt;
total = 0&lt;br /&gt;
&lt;br /&gt;
for value in values:&lt;br /&gt;
    total += value&lt;br /&gt;
&lt;br /&gt;
print(total)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Python Turtle Graphics example.png|500px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
Turtle graphics can make iteration visible because repeated commands create geometric patterns.&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|https://www.youtube.com/watch?v=_b6NgY_pMdw|500|center}}&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|https://www.youtube.com/watch?v=-7xg8pGcP6w|500|center}}&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Functions and Abstraction =&lt;br /&gt;
&lt;br /&gt;
A function groups behavior behind a name and a clear interface. Parameters describe input to the function, while a return value communicates a result to the caller.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
def mean(values):&lt;br /&gt;
    return sum(values) / len(values)&lt;br /&gt;
&lt;br /&gt;
sample = [4.0, 7.5, 9.5]&lt;br /&gt;
print(mean(sample))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Good functions usually have one coherent responsibility. Their names should communicate intent, and their interfaces should make them easy to test and reuse.&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
== Scope and Arguments ==&lt;br /&gt;
&lt;br /&gt;
Names created inside a function are normally local to that function. Arguments can be passed positionally or by keyword. Default parameter values can make interfaces convenient when the meaning remains clear.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
def format_measurement(value, unit=&amp;quot;m&amp;quot;, precision=2):&lt;br /&gt;
    return f&amp;quot;{value:.{precision}f} {unit}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
print(format_measurement(3.14159))&lt;br /&gt;
print(format_measurement(3.14159, unit=&amp;quot;cm&amp;quot;, precision=1))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Data Structures =&lt;br /&gt;
&lt;br /&gt;
Choosing a data structure is a design decision. A list is an ordered mutable sequence. A tuple is an ordered sequence often used for fixed groups of values. A set stores unique elements. A dictionary maps keys to values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
student = {&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;Amina&amp;quot;,&lt;br /&gt;
    &amp;quot;program&amp;quot;: &amp;quot;Computer Science&amp;quot;,&lt;br /&gt;
    &amp;quot;credits&amp;quot;: 72&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
modules = [&amp;quot;Algorithms&amp;quot;, &amp;quot;Databases&amp;quot;, &amp;quot;Statistics&amp;quot;]&lt;br /&gt;
skills = {&amp;quot;Python&amp;quot;, &amp;quot;Git&amp;quot;, &amp;quot;Testing&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
student[&amp;quot;credits&amp;quot;] += 6&lt;br /&gt;
modules.append(&amp;quot;Software Engineering&amp;quot;)&lt;br /&gt;
skills.add(&amp;quot;Documentation&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comprehensions are useful for concise transformations when the result remains readable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
squares = [pow(n, 2) for n in range(10)]&lt;br /&gt;
even_squares = [value for value in squares if value % 2 == 0]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Robust Programs and Exceptions =&lt;br /&gt;
&lt;br /&gt;
Programs should anticipate unusual input and external conditions. Python uses exceptions to signal that normal execution cannot continue in the expected way. You should validate assumptions, keep recovery logic focused, and avoid hiding unexpected situations.&lt;br /&gt;
&lt;br /&gt;
A simple input check can prevent unsuitable values from reaching later calculations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
def is_positive_integer(text):&lt;br /&gt;
    return text.isdigit() and int(text) &amp;gt; 0&lt;br /&gt;
&lt;br /&gt;
print(is_positive_integer(&amp;quot;12&amp;quot;))&lt;br /&gt;
print(is_positive_integer(&amp;quot;-4&amp;quot;))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In larger programs, targeted &amp;lt;code&amp;gt;try&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;except&amp;lt;/code&amp;gt; blocks can be used around operations that may fail for known reasons. The goal is to respond deliberately rather than ignore problems.&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|https://www.youtube.com/watch?v=LW7g1169v7w|500|center}}&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Files and Structured Data =&lt;br /&gt;
&lt;br /&gt;
Programs often exchange information through files. A context manager created with &amp;lt;code&amp;gt;with&amp;lt;/code&amp;gt; ensures that a file is closed after use.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from pathlib import Path&lt;br /&gt;
&lt;br /&gt;
path = Path(&amp;quot;results.txt&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
with path.open(&amp;quot;w&amp;quot;, encoding=&amp;quot;utf-8&amp;quot;) as file:&lt;br /&gt;
    file.write(&amp;quot;experiment,score\n&amp;quot;)&lt;br /&gt;
    file.write(&amp;quot;alpha,0.82\n&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Formats such as CSV and JSON are useful when data needs to be exchanged with other tools.&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|https://www.youtube.com/watch?v=KD-Yoel6EVQ|500|center}}&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Modules, Packages, and Environments =&lt;br /&gt;
&lt;br /&gt;
A module is a Python file that defines reusable code. A package organizes related modules. Imports let you reuse tested components instead of duplicating them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from statistics import mean, median&lt;br /&gt;
&lt;br /&gt;
values = [2, 3, 5, 8, 13]&lt;br /&gt;
print(mean(values))&lt;br /&gt;
print(median(values))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Third-party packages extend Python. For university projects, use an isolated virtual environment and record project dependencies so that others can reproduce the setup.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
python -m venv .venv&lt;br /&gt;
python -m pip install package_name&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|https://www.youtube.com/watch?v=MztLZWibctI|500|center}}&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Object-Oriented Programming =&lt;br /&gt;
&lt;br /&gt;
A class defines a type, and an instance is a concrete object of that type. Attributes hold state, while methods implement behavior.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
class Counter:&lt;br /&gt;
    def __init__(self, start=0):&lt;br /&gt;
        self.value = start&lt;br /&gt;
&lt;br /&gt;
    def increment(self, step=1):&lt;br /&gt;
        self.value += step&lt;br /&gt;
&lt;br /&gt;
counter = Counter(10)&lt;br /&gt;
counter.increment(3)&lt;br /&gt;
print(counter.value)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Classes are useful when a problem contains entities with persistent state and related operations. They are not automatically better than functions. Choose the simplest design that models the problem clearly.&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|https://www.youtube.com/watch?v=e4fwY9ZsxPw|500|center}}&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Testing, Debugging, and Code Quality =&lt;br /&gt;
&lt;br /&gt;
Automated tests give evidence that a program behaves as intended for selected cases. Unit tests focus on small units such as functions or methods. Good tests include normal cases and boundary cases.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import unittest&lt;br /&gt;
&lt;br /&gt;
def clamp(value, lower, upper):&lt;br /&gt;
    return max(lower, min(value, upper))&lt;br /&gt;
&lt;br /&gt;
class ClampTests(unittest.TestCase):&lt;br /&gt;
    def test_inside_range(self):&lt;br /&gt;
        self.assertEqual(clamp(5, 0, 10), 5)&lt;br /&gt;
&lt;br /&gt;
    def test_above_range(self):&lt;br /&gt;
        self.assertEqual(clamp(15, 0, 10), 10)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Debugging is a process of forming and testing hypotheses about why observed behavior differs from intended behavior. Useful techniques include reproducing a problem with a small example, inspecting values, stepping through code, and adding a regression test after a fix.&lt;br /&gt;
&lt;br /&gt;
[[English:PEP 8|PEP 8]] provides widely used style guidance for Python code. Meaningful names, focused functions, useful documentation, and consistent formatting improve maintainability.&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|https://www.youtube.com/watch?v=tIrcxwLqzjQ|500|center}}&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Python for Data and Scientific Work =&lt;br /&gt;
&lt;br /&gt;
Python has a large ecosystem for scientific and data work. Libraries such as [[English:NumPy|NumPy]], [[English:Pandas|pandas]], [[English:Matplotlib|Matplotlib]], and [[English:SciPy|SciPy]] support numerical arrays, tabular data, visualization, and scientific methods.&lt;br /&gt;
&lt;br /&gt;
[[File:Matplotlib basic v.svg|500px|frameless|center]]&lt;br /&gt;
&lt;br /&gt;
When you visualize data, select a chart type that matches the question. A line plot can show change across an ordered dimension, a scatter plot can show relationships between numerical variables, and a histogram can show a distribution.&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Performance and Computational Thinking =&lt;br /&gt;
&lt;br /&gt;
Correctness comes before optimization. When performance matters, measure where time or memory is being spent. Algorithm and data-structure choices often matter more than small syntax changes.&lt;br /&gt;
&lt;br /&gt;
Generators and iterators can process values one at a time instead of constructing every result in memory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
def positive_measurements(values):&lt;br /&gt;
    for value in values:&lt;br /&gt;
        if value &amp;gt; 0:&lt;br /&gt;
            yield value&lt;br /&gt;
&lt;br /&gt;
for measurement in positive_measurements([3, -1, 4, 0, 5]):&lt;br /&gt;
    print(measurement)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Version Control and Responsible Practice =&lt;br /&gt;
&lt;br /&gt;
Use [[English:Version control|version control]] such as [[English:Git|Git]] to record changes, collaborate, and review contributions. Write commit messages that explain intent and keep credentials out of repositories.&lt;br /&gt;
&lt;br /&gt;
Responsible programming includes respecting software licenses, protecting sensitive data, documenting limitations, checking outputs, and evaluating third-party dependencies before relying on them.&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Interactive Tasks =&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
== Quiz: Test Your Knowledge ==&lt;br /&gt;
&lt;br /&gt;
{{MC}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Which built-in data structure maps unique keys to values?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
(Dictionary)&lt;br /&gt;
(!List)&lt;br /&gt;
(!Tuple)&lt;br /&gt;
(!String)&lt;br /&gt;
&lt;br /&gt;
{{E}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{MC}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;What is the main purpose of a function return statement?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
(To send a result back to the caller)&lt;br /&gt;
(!To import a package)&lt;br /&gt;
(!To start a class definition)&lt;br /&gt;
(!To install software)&lt;br /&gt;
&lt;br /&gt;
{{E}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{MC}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Which statement selects between alternative branches?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
(if)&lt;br /&gt;
(!import)&lt;br /&gt;
(!yield)&lt;br /&gt;
(!pass)&lt;br /&gt;
&lt;br /&gt;
{{E}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{MC}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;What does a for loop normally do?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
(Iterates over items from an iterable)&lt;br /&gt;
(!Creates a package)&lt;br /&gt;
(!Defines a class automatically)&lt;br /&gt;
(!Installs a dependency)&lt;br /&gt;
&lt;br /&gt;
{{E}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{MC}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Why is a virtual environment useful?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
(It isolates project dependencies)&lt;br /&gt;
(!It encrypts source code)&lt;br /&gt;
(!It replaces all tests)&lt;br /&gt;
(!It creates documentation automatically)&lt;br /&gt;
&lt;br /&gt;
{{E}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{MC}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Which structure is designed to store unique elements?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
(Set)&lt;br /&gt;
(!String)&lt;br /&gt;
(!Float)&lt;br /&gt;
(!Boolean)&lt;br /&gt;
&lt;br /&gt;
{{E}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{MC}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;What does a unit test primarily examine?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
(A small unit of program behavior)&lt;br /&gt;
(!Only the graphical interface)&lt;br /&gt;
(!Only the operating system)&lt;br /&gt;
(!Only network speed)&lt;br /&gt;
&lt;br /&gt;
{{E}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{MC}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;What is an instance in object-oriented Python?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
(A concrete object created from a class)&lt;br /&gt;
(!A package index)&lt;br /&gt;
(!A Git branch)&lt;br /&gt;
(!A source file extension)&lt;br /&gt;
&lt;br /&gt;
{{E}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{MC}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;What should you usually do before optimizing code for speed?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
(Measure where the real bottleneck is)&lt;br /&gt;
(!Remove tests)&lt;br /&gt;
(!Replace every function with a class)&lt;br /&gt;
(!Rewrite every loop recursively)&lt;br /&gt;
&lt;br /&gt;
{{E}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{MC}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Which practice improves maintainability?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
(Using clear names and focused functions)&lt;br /&gt;
(!Duplicating code across files)&lt;br /&gt;
(!Hiding project dependencies)&lt;br /&gt;
(!Avoiding documentation)&lt;br /&gt;
&lt;br /&gt;
{{E}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
== Memory Game ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;memo-quiz&amp;quot;&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| List || Mutable ordered sequence&lt;br /&gt;
|-&lt;br /&gt;
| Tuple || Ordered sequence commonly used for fixed groups&lt;br /&gt;
|-&lt;br /&gt;
| Dictionary || Mapping from keys to values&lt;br /&gt;
|-&lt;br /&gt;
| Set || Collection of unique elements&lt;br /&gt;
|-&lt;br /&gt;
| Function || Reusable unit of behavior with an interface&lt;br /&gt;
|-&lt;br /&gt;
| Class || Definition used to create objects&lt;br /&gt;
|}&lt;br /&gt;
{{E}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
== Drag and Drop ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;lueckentext-quiz&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Match the correct terms.&lt;br /&gt;
! Topic&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Conditional branching&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| if statement&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Iteration over items&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| for loop&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Reusable behavior&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| function&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Key-value storage&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| dictionary&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Automated verification&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| unit test&lt;br /&gt;
|}&lt;br /&gt;
{{E}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
== Crossword Puzzle ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;kreuzwort-quiz&amp;quot;&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| Iteration || What process repeats operations over successive items?&lt;br /&gt;
|-&lt;br /&gt;
| Dictionary || Which mapping structure stores values under keys?&lt;br /&gt;
|-&lt;br /&gt;
| Function || What reusable block of behavior can receive arguments?&lt;br /&gt;
|-&lt;br /&gt;
| Inheritance || What mechanism derives one class from another?&lt;br /&gt;
|-&lt;br /&gt;
| Generator || What construct can yield values lazily one at a time?&lt;br /&gt;
|-&lt;br /&gt;
| Debugging || What process investigates incorrect program behavior?&lt;br /&gt;
|}&lt;br /&gt;
{{E}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
== LearningApps ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;iframe&amp;gt; https://learningapps.org/index.php?s=Programming+with+Python &amp;lt;/iframe&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
== Cloze Text ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;quiz display=simple&amp;gt;&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039;Complete the text.&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
|type=&amp;quot;{}&amp;quot;}&lt;br /&gt;
Python uses { indentation } to mark suites of statements in blocks. A function sends a result to its caller with { return }. A mapping from keys to values is called a { dictionary }. A loop processes a sequence of items through { iteration }. Project dependencies can be isolated inside a { virtual environment }. Automated checks of small program units are called { unit tests }. A class is used to create concrete objects called { instances }.&lt;br /&gt;
&amp;lt;/quiz&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Open-Ended Tasks =&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
=== Easy ===&lt;br /&gt;
# [[English:Python Code Reading|Python Code Reading]]: Choose a short Python program, annotate each line in plain English, and explain how data changes while the program runs.&lt;br /&gt;
# [[English:Small Automation Script|Small Automation Script]]: Write a script that automates a simple study task such as converting units or summarizing a list of values.&lt;br /&gt;
# [[English:Algorithm Poster|Algorithm Poster]]: Create an image or poster that compares sequence, selection, and iteration and add one Python example for each.&lt;br /&gt;
# [[English:Peer Interview on Programming|Peer Interview on Programming]]: Interview another student about one programming difficulty and write a short reflection on possible strategies.&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
=== Standard ===&lt;br /&gt;
# [[English:Data Analysis Mini Project|Data Analysis Mini Project]]: Obtain a small open dataset, clean it with Python, compute meaningful summaries, create one visualization, and explain the result.&lt;br /&gt;
# [[English:Testing Laboratory|Testing Laboratory]]: Design a function, create tests for normal and boundary cases, then alter the function and observe which tests detect the change.&lt;br /&gt;
# [[English:Python Tutorial Video|Python Tutorial Video]]: Produce a short instructional video that teaches one Python concept through a worked example.&lt;br /&gt;
# [[English:Code Review Workshop|Code Review Workshop]]: Exchange a program with a peer, review naming, decomposition, documentation, and tests, then revise your own program.&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
=== Advanced ===&lt;br /&gt;
# [[English:Reproducible Research Workflow|Reproducible Research Workflow]]: Build a small research workflow that reads data, performs an analysis, creates a figure, records dependencies, and can be rerun from a clean environment.&lt;br /&gt;
# [[English:Software Architecture Comparison|Software Architecture Comparison]]: Solve the same problem once with functions and once with classes, then compare extensibility, clarity, and testing effort.&lt;br /&gt;
# [[English:Performance Experiment|Performance Experiment]]: Form a hypothesis about two data structures or algorithms, design a controlled timing experiment, visualize the measurements, and discuss limitations.&lt;br /&gt;
# [[English:Open Source Field Study|Open Source Field Study]]: Visit a public Python repository, study its issues, tests, documentation, and contribution guide, then write an evidence-based report on collaboration practices.&lt;br /&gt;
&lt;br /&gt;
{{:Open Task - Create a MOOC}}&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Learning Assessment =&lt;br /&gt;
&lt;br /&gt;
# [[English:Program Design Assessment|Program Design Assessment]]: Decompose a real-world problem into functions, choose suitable data structures, implement the solution, and justify your design decisions.&lt;br /&gt;
# [[English:Debugging Assessment|Debugging Assessment]]: Analyze a faulty program, reproduce the unwanted behavior, repair it, and add a test that demonstrates the intended result.&lt;br /&gt;
# [[English:Data Structure Transfer|Data Structure Transfer]]: Compare two possible representations for the same dataset and explain how each choice changes readability, operations, and performance.&lt;br /&gt;
# [[English:Reproducibility Assessment|Reproducibility Assessment]]: Package a small project with clear setup instructions and isolated dependencies so that another student can run it from a clean environment.&lt;br /&gt;
# [[English:Object Model Assessment|Object Model Assessment]]: Design a class-based model for a small domain, identify important state and methods, and explain where composition is preferable to inheritance.&lt;br /&gt;
# [[English:Critical Code Review|Critical Code Review]]: Review an unfamiliar Python program for correctness, test quality, style, documentation, and maintainability, then prioritize improvements.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Evidence of Learning =&lt;br /&gt;
&lt;br /&gt;
Evidence of learning includes working Python programs, accurate explanations of control flow and data structures, functions with clear interfaces, appropriate use of modules and files, automated tests, reproducible environments, readable code, reasoned design decisions, visual or written communication of results, and transfer of programming concepts to unfamiliar problems.&lt;br /&gt;
&lt;br /&gt;
Strong evidence also includes your ability to explain trade-offs. You should be able to justify why a data structure, algorithm, interface, testing strategy, or object model was chosen and identify limitations in your solution.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= OERs on the Topic =&lt;br /&gt;
&lt;br /&gt;
The official Python tutorial and standard-library documentation provide authoritative reference material. The Python Packaging User Guide explains virtual environments and packaging. MIT OpenCourseWare and Harvard CS50P provide university-level programming instruction. [[English:PEP 8|PEP 8]] offers widely used style guidance.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;iframe&amp;gt; https://en.m.wikipedia.org/wiki/Python_(programming_language) &amp;lt;/iframe&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= Linked Learning Areas =&lt;br /&gt;
&lt;br /&gt;
{| align=center&lt;br /&gt;
{{:D-Tab}}&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[[English:Programming with Python|Programming with Python]]&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
# [[English:Python syntax and semantics|Python syntax and semantics]]&lt;br /&gt;
# [[English:Control flow|Control flow]]&lt;br /&gt;
# [[English:Data structures|Data structures]]&lt;br /&gt;
# [[English:Function|Function]]&lt;br /&gt;
# [[English:Object-oriented programming|Object-oriented programming]]&lt;br /&gt;
# [[English:Software testing|Software testing]]&lt;br /&gt;
# [[English:Data science|Data science]]&lt;br /&gt;
# [[English:Version control|Version control]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Programming with Python connects with [[English:Computer science|Computer science]], [[English:Software engineering|Software engineering]], [[English:Algorithms|Algorithms]], [[English:Data science|Data science]], [[English:Artificial intelligence|Artificial intelligence]], [[English:Scientific computing|Scientific computing]], [[English:Statistics|Statistics]], [[English:Cybersecurity|Cybersecurity]], [[English:Web development|Web development]], [[English:Automation|Automation]], and [[English:Reproducible research|Reproducible research]].&lt;br /&gt;
&lt;br /&gt;
{{BR}}&lt;br /&gt;
= aiMOOC Projects =&lt;br /&gt;
[[Category:English]]&lt;br /&gt;
[[Category:Programming with Python]]&lt;br /&gt;
[[Category:Higher Education]]&lt;br /&gt;
[[Category:Computer Science]]&lt;br /&gt;
[[Category:Programming]]&lt;br /&gt;
[[Category:Python]]&lt;br /&gt;
[[Category:Software Engineering]]&lt;br /&gt;
[[Category:Data Science]]&lt;br /&gt;
[[Category:AI_MOOC]]&lt;br /&gt;
[[Category:GPT aiMOOC]]&lt;br /&gt;
{{MT}}&lt;/div&gt;</summary>
		<author><name>Glanz</name></author>
	</entry>
</feed>