Skip to content

Commit 2a81b9f

Browse files
Built site for gh-pages
1 parent 938d13c commit 2a81b9f

File tree

172 files changed

+493
-28789
lines changed

Some content is hidden

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

172 files changed

+493
-28789
lines changed

.nojekyll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
19e95e5e
1+
3643a8c4

.nojekyll 3

Whitespace-only changes.

404 2.html

Lines changed: 0 additions & 895 deletions
This file was deleted.

assignments/assignment_01.html

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ <h2 id="toc-title">On this page</h2>
450450
<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>
451451
<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>
452452
<li><a href="#hangman" id="toc-hangman" class="nav-link" data-scroll-target="#hangman">Hangman</a></li>
453+
<li><a href="#caesar-cipher" id="toc-caesar-cipher" class="nav-link" data-scroll-target="#caesar-cipher">Caesar Cipher</a></li>
453454
</ul>
454455
<div class="toc-actions"><ul><li><a href="https://github.com/beyondsimulations/Introduction-to-Python/blob/main/assignments/assignment_01.qmd" class="toc-action"><i class="bi bi-github"></i>View source</a></li><li><a href="https://github.com/beyondsimulations/Introduction-to-Python/issues/new" class="toc-action"><i class="bi empty"></i>Report an issue</a></li></ul></div><div class="quarto-alternate-formats"><h2>Other Formats</h2><ul><li><a href="assignment_01.pdf"><i class="bi bi-file-pdf"></i>PDF</a></li></ul></div></nav>
455456
</div>
@@ -478,13 +479,13 @@ <h1 class="title">Assignment I</h1>
478479

479480
<section id="introduction" class="level1">
480481
<h1>Introduction</h1>
481-
<p>This is the first of the two assignments for this course. It will be graded as pass/fail and you and your group of up to 3 students will need to submit it before the start of the last lecture. Please hand in one assignment per group via the e-mail address <a href="mailto:[email protected]">[email protected]</a>.</p>
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>
482483
<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>
483484
</section>
484485
<section id="tax-refund-for-donations" class="level1">
485486
<h1>Tax refund for donations</h1>
486487
<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>
487-
<div id="049bd0bd" class="cell" data-execution_count="1">
488+
<div id="0c5041de" class="cell" data-execution_count="1">
488489
<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>
489490
<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>
490491
<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>
@@ -502,8 +503,8 @@ <h1>Tax refund for donations</h1>
502503
</section>
503504
<section id="text-based-adventure-game" class="level1">
504505
<h1>Text based adventure game</h1>
505-
<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 3 choices, 2 different endings and the choice to restart 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>
506-
<div id="2967dad9" class="cell" data-execution_count="2">
506+
<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>
507+
<div id="51fcfe00" class="cell" data-execution_count="2">
507508
<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>
508509
<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>
509510
<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>
@@ -512,11 +513,19 @@ <h1>Text based adventure game</h1>
512513
<section id="hangman" class="level1">
513514
<h1>Hangman</h1>
514515
<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>
515-
<div id="eb9552bd" class="cell" data-execution_count="3">
516+
<div id="34d3be3b" class="cell" data-execution_count="3">
516517
<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>
517518
<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>
518519
<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>
519520
</div>
521+
</section>
522+
<section id="caesar-cipher" class="level1">
523+
<h1>Caesar Cipher</h1>
524+
<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>
525+
<div id="a7c92fe6" class="cell" data-execution_count="4">
526+
<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>
527+
<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>
528+
</div>
520529

521530

522531
</section>

assignments/assignment_01.pdf

1.89 KB
Binary file not shown.

0 commit comments

Comments
 (0)