Skip to content

Commit 48db6c4

Browse files
Built site for gh-pages
1 parent 6ab5063 commit 48db6c4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+751
-536
lines changed

.nojekyll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
d3fb79e0
1+
66c35d3d

assignments/assignment_01.html

Lines changed: 98 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,8 @@ <h2 id="toc-title">On this page</h2>
447447

448448
<ul>
449449
<li><a href="#introduction" id="toc-introduction" class="nav-link active" data-scroll-target="#introduction">Introduction</a></li>
450+
<li><a href="#grading-of-the-assignment" id="toc-grading-of-the-assignment" class="nav-link" data-scroll-target="#grading-of-the-assignment">Grading of the Assignment</a></li>
451+
<li><a href="#submission-format" id="toc-submission-format" class="nav-link" data-scroll-target="#submission-format">Submission format</a></li>
450452
<li><a href="#tax-refund-for-donations" id="toc-tax-refund-for-donations" class="nav-link" data-scroll-target="#tax-refund-for-donations">Tax refund for donations</a></li>
451453
<li><a href="#text-based-adventure-game" id="toc-text-based-adventure-game" class="nav-link" data-scroll-target="#text-based-adventure-game">Text based adventure game</a></li>
452454
<li><a href="#hangman" id="toc-hangman" class="nav-link" data-scroll-target="#hangman">Hangman</a></li>
@@ -477,15 +479,103 @@ <h1 class="title">Assignment I</h1>
477479
</header>
478480

479481

480-
<section id="introduction" class="level1">
481-
<h1>Introduction</h1>
482-
<p>This is the first of the two assignments for this course. It will be graded as pass/fail. You and your group of up to 3 students will need to submit it <strong>before the start of lecture 7 on scientific programming</strong>. Please hand in one assignment per group via the e-mail address <a href="mailto:[email protected]">[email protected]</a>.</p>
483-
<p>In the assignment, you will practice the concepts you learned in the first part of the course. You will find a lot of information online and you are welcome to use generative AI to help you with the assignment. However, you are not allowed to copy the code from other groups and you have to indicate where and how you used AI to help you. Try to use comments to structure and to explain your code. Furthermore, use descriptive variable names and format your code nicely in order to make it more readable.</p>
482+
<section id="introduction" class="level2">
483+
<h2 class="anchored" data-anchor-id="introduction">Introduction</h2>
484+
<p>This is the first of two course assignments and here you will practice concepts from the first part of the course from lecture 01 to 06.</p>
485+
</section>
486+
<section id="grading-of-the-assignment" class="level2">
487+
<h2 class="anchored" data-anchor-id="grading-of-the-assignment">Grading of the Assignment</h2>
488+
<p>It is graded pass/fail and at least 50 % of the tasks in the assignments have to be passed in oder to pass the assigment. You may work in groups of up to three students and you should submit one assignment per group via email to <a href="mailto:[email protected]">[email protected]</a> before the start of Lecture 7 on scientific programming.</p>
489+
<p>You may use online resources and generative AI (gAI) for assistance. However, you must not copy code from other groups, and you must include a short paragraph titled <code>How I used generative AI</code> that explains where and how you used gAI.</p>
490+
<div class="callout callout-style-simple callout-tip callout-titled">
491+
<div class="callout-header d-flex align-content-center">
492+
<div class="callout-icon-container">
493+
<i class="callout-icon"></i>
494+
</div>
495+
<div class="callout-title-container flex-fill">
496+
<span class="screen-reader-only">Tip</span>How I used generative AI (template)
497+
</div>
498+
</div>
499+
<div class="callout-body-container callout-body">
500+
<ul>
501+
<li>Provider(s) used (e.g., “OpenAI, Anthropic, Google”)</li>
502+
<li>Whether you used a browser or an IDE to communicate with the provider</li>
503+
<li>Your key prompts (1–3 lines), or a brief description of them</li>
504+
<li>How you verified correctness (tests, docs checks, manual reasoning)</li>
505+
</ul>
506+
</div>
507+
</div>
508+
<p>Note, you are fully responsible for the correctness and originality of submitted work, regardless of gAI use.</p>
509+
<div class="callout callout-style-simple callout-warning">
510+
<div class="callout-body d-flex">
511+
<div class="callout-icon-container">
512+
<i class="callout-icon"></i>
513+
</div>
514+
<div class="callout-body-container">
515+
<p>If you use gAI without including a paragraph on its use (use of gAI is typically easy to spot), the assignment will be marked as failed.</p>
516+
</div>
517+
</div>
518+
</div>
519+
<p>Use comments and docstrings to explain your code. Do not include gAI-generated meta-comments describing what gAI changed. Thus, keep comments focused on explaining the code itself.</p>
520+
<div class="callout callout-style-simple callout-warning">
521+
<div class="callout-body d-flex">
522+
<div class="callout-icon-container">
523+
<i class="callout-icon"></i>
524+
</div>
525+
<div class="callout-body-container">
526+
<p>If I find multiple instances of such gAI meta-comments, the assignment will be marked as failed. Keep your comments clean and relevant.</p>
527+
</div>
528+
</div>
529+
</div>
530+
<p>Use descriptive variable names and format your code consistently to maximize readability. Read the instructions carefully and follow them exactly. gAI may hallucinate additional features that are not required.</p>
531+
<div class="callout callout-style-simple callout-warning">
532+
<div class="callout-body d-flex">
533+
<div class="callout-icon-container">
534+
<i class="callout-icon"></i>
535+
</div>
536+
<div class="callout-body-container">
537+
<p>Ensure the tasks of the assignment run without any errors or mistakes just by calling <code>uv run [your filename]</code>. If you used external packages, include your <code>pyproject.toml</code> so I can replicate your environments.</p>
538+
</div>
539+
</div>
540+
</div>
541+
</section>
542+
<section id="submission-format" class="level2">
543+
<h2 class="anchored" data-anchor-id="submission-format">Submission format</h2>
544+
<ul>
545+
<li>Submit a single ZIP named <code>a1_group-&lt;number&gt;_&lt;lastname1-lastname2_lastname3&gt;.zip</code></li>
546+
<li>Include:
547+
<ul>
548+
<li><code>assignment_1_task1.py</code>, <code>assignment_1_task2.py</code>, and so on</li>
549+
<li>Any data files used in a <code>data/</code> folder (if used)</li>
550+
<li>Any images in an <code>assets/</code> folder (if used)</li>
551+
</ul></li>
552+
<li>Email subject: <code>Intro to Python – Assignment 1</code></li>
553+
</ul>
554+
<div class="callout callout-style-simple callout-tip callout-titled">
555+
<div class="callout-header d-flex align-content-center">
556+
<div class="callout-icon-container">
557+
<i class="callout-icon"></i>
558+
</div>
559+
<div class="callout-title-container flex-fill">
560+
<span class="screen-reader-only">Tip</span>Submission checklist
561+
</div>
562+
</div>
563+
<div class="callout-body-container callout-body">
564+
<ul class="task-list">
565+
<li><label><input type="checkbox">Runs without errors from a clean environment by using <code>uv</code></label></li>
566+
<li><label><input type="checkbox">No unexplained gAI meta-comments, all comments explain code</label></li>
567+
<li><label><input type="checkbox">“How I used generative AI” paragraph included (if gAI used)</label></li>
568+
<li><label><input type="checkbox">Data/assets included and paths correct (if used)</label></li>
569+
<li><label><input type="checkbox"><code>pyproject.toml</code> included (if external packages are used)</label></li>
570+
<li><label><input type="checkbox">File naming and email subject follow the conventions</label></li>
571+
</ul>
572+
</div>
573+
</div>
484574
</section>
485575
<section id="tax-refund-for-donations" class="level1">
486576
<h1>Tax refund for donations</h1>
487577
<p>In this excercise, you will create a program that is able to calculate the amount of tax a person can get back for a donation. First, research the rules for tax refunds for donations in Germany. Then, create a program that is able to <strong>calculate the amount of tax a person can get back</strong> for a donation. The program should ask the user for the <strong>amount of the donation and the yearly income</strong> and then calculate the amount of tax the user can get back. The program should then print the amount of tax to the console. Note, that the program should also handle wrong inputs from the user, e.g.&nbsp;if the user enters a negative donation amount or a non-numeric income.</p>
488-
<div id="64bedc81" class="cell" data-execution_count="1">
578+
<div id="b59d7b47" class="cell" data-execution_count="1">
489579
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb1"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Tax refund for donations</span></span>
490580
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="co"># </span><span class="al">TODO</span><span class="co">: Create a program that is able to calculate the amount of tax a person can get back for a donation.</span></span>
491581
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="co"># Your code here</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
@@ -514,7 +604,7 @@ <h1>Tax refund for donations</h1>
514604
<section id="text-based-adventure-game" class="level1">
515605
<h1>Text based adventure game</h1>
516606
<p>In this excercise, you will create a text based adventure game. You are completely free in the choice of the story, but it must <strong>at least include 4 choices, 3 different endings, the choice to restart the game and yourself as a character of the game</strong>. Try to use the concepts of conditionals, loops, and functions to create a game that is both fun and interactive for the user. Note, that the program should also handle wrong inputs from the user, e.g.&nbsp;if the user enters a choice that is not available.</p>
517-
<div id="14884b1d" class="cell" data-execution_count="2">
607+
<div id="46405228" class="cell" data-execution_count="2">
518608
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb2"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Test based adventure game</span></span>
519609
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="co"># </span><span class="al">TODO</span><span class="co">: Create a text based adventure game with at least 3 choices, 2 different endings and the choice to restart the game.</span></span>
520610
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a><span class="co"># Your code here</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
@@ -523,7 +613,7 @@ <h1>Text based adventure game</h1>
523613
<section id="hangman" class="level1">
524614
<h1>Hangman</h1>
525615
<p>In this excercise, you will create a program that is able to play the game Hangman. The program should ask the <strong>game master for a secret word</strong>. Afterward, it should ask the player to guess a letter and then check if the letter is in the word. The program should then print the word with the guessed letters and the number of tries left. The program should also handle wrong inputs from the user, e.g.&nbsp;if the user enters a non-letter or a letter that is already guessed.</p>
526-
<div id="764886ec" class="cell" data-execution_count="3">
616+
<div id="52a9a5b0" class="cell" data-execution_count="3">
527617
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb3"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Hangman</span></span>
528618
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="co"># </span><span class="al">TODO</span><span class="co">: Create a program that is able to play the game Hangman with a game master and one player.</span></span>
529619
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="co"># Your code here</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
@@ -532,7 +622,7 @@ <h1>Hangman</h1>
532622
<section id="caesar-cipher" class="level1">
533623
<h1>Caesar Cipher</h1>
534624
<p>In this excercise, you will create a program that is able to <strong>encrypt and decrypt messages</strong> using the Caesar Cipher. The program should ask the user for a <strong>message and a key</strong> and whether to encrypt or decrypt the message. The program should then <strong>encrypt the message</strong> by shifting each letter of the message by the key or <strong>decrypt the message</strong> by shifting each letter of the message back by the key. The program should then print the encrypted or decrypted message and asks the user whether to continue with the next message or to quit the program. Note, that you only need to encrypt or decrypt letters, keep other characters unchanged.</p>
535-
<div id="31bd905a" class="cell" data-execution_count="4">
625+
<div id="81ba4a48" class="cell" data-execution_count="4">
536626
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb4"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="co"># </span><span class="al">TODO</span><span class="co">: Create a programm able to encrypt and decrypt messages using the Caesar Cipher.</span></span>
537627
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="co"># Your code here</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
538628
</div>

assignments/assignment_01.pdf

11.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)