You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<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. if the user enters a negative donation amount or a non-numeric income.</p>
<spanid="cb1-2"><ahref="#cb1-2" aria-hidden="true" tabindex="-1"></a><spanclass="co"># </span><spanclass="al">TODO</span><spanclass="co">: Create a program that is able to calculate the amount of tax a person can get back for a donation.</span></span>
490
490
<spanid="cb1-3"><ahref="#cb1-3" aria-hidden="true" tabindex="-1"></a><spanclass="co"># Your code here</span></span></code></pre></div><buttontitle="Copy to Clipboard" class="code-copy-button"><iclass="bi"></i></button></div>
<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. if the user enters a choice that is not available.</p>
<divclass="code-copy-outer-scaffold"><divclass="sourceCode cell-code" id="cb2"><preclass="sourceCode python code-with-copy"><codeclass="sourceCode python"><spanid="cb2-1"><ahref="#cb2-1" aria-hidden="true" tabindex="-1"></a><spanclass="co"># Test based adventure game</span></span>
511
508
<spanid="cb2-2"><ahref="#cb2-2" aria-hidden="true" tabindex="-1"></a><spanclass="co"># </span><spanclass="al">TODO</span><spanclass="co">: Create a text based adventure game with at least 3 choices, 2 different endings and the choice to restart the game.</span></span>
512
509
<spanid="cb2-3"><ahref="#cb2-3" aria-hidden="true" tabindex="-1"></a><spanclass="co"># Your code here</span></span></code></pre></div><buttontitle="Copy to Clipboard" class="code-copy-button"><iclass="bi"></i></button></div>
@@ -515,7 +512,7 @@ <h1>Text based adventure game</h1>
515
512
<sectionid="hangman" class="level1">
516
513
<h1>Hangman</h1>
517
514
<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. if the user enters a non-letter or a letter that is already guessed.</p>
<spanid="cb3-2"><ahref="#cb3-2" aria-hidden="true" tabindex="-1"></a><spanclass="co"># </span><spanclass="al">TODO</span><spanclass="co">: Create a program that is able to play the game Hangman with a game master and one player.</span></span>
521
518
<spanid="cb3-3"><ahref="#cb3-3" aria-hidden="true" tabindex="-1"></a><spanclass="co"># Your code here</span></span></code></pre></div><buttontitle="Copy to Clipboard" class="code-copy-button"><iclass="bi"></i></button></div>
<p>In this excercise, you will create a program that is able to redact secret information in a text. The program should be able to redact the following: <strong>zip codes, names, email addresses and phone numbers.</strong> The program should ask the user <strong>for a filename</strong> and then read the file and <strong>redact the secret information</strong>. The program should then print the redacted text to the console and write it to a new file called <code>redacted.txt</code>. You can find a file with secret information in the git repository under <code>assignments/secret-text.txt</code>.</p>
<spanid="cb1-2"><ahref="#cb1-2" aria-hidden="true" tabindex="-1"></a><spanclass="co"># </span><spanclass="al">TODO</span><spanclass="co">: Create a program that is able to redact secret information in a text.</span></span>
490
490
<spanid="cb1-3"><ahref="#cb1-3" aria-hidden="true" tabindex="-1"></a><spanclass="co"># YOUR CODE HERE</span></span></code></pre></div><buttontitle="Copy to Clipboard" class="code-copy-button"><iclass="bi"></i></button></div>
<p>In this excercise, you will create a program that is able to simulate dice rolls and visualizes their distribution. The program should ask the user for <strong>the number of sides on the dice and the number of dices to roll</strong>. Then, the program should simulate the dice rolls 10000 times and <strong>visualize the distribution</strong> of the dice rolls using a histogram.</p>
<spanid="cb2-2"><ahref="#cb2-2" aria-hidden="true" tabindex="-1"></a><spanclass="co"># </span><spanclass="al">TODO</span><spanclass="co">: Create a program that is able to simulate a dice roll.</span></span>
499
499
<spanid="cb2-3"><ahref="#cb2-3" aria-hidden="true" tabindex="-1"></a><spanclass="co"># YOUR CODE HERE</span></span></code></pre></div><buttontitle="Copy to Clipboard" class="code-copy-button"><iclass="bi"></i></button></div>
@@ -502,20 +502,17 @@ <h1>Dice roll simulator</h1>
502
502
<sectionid="dashboards" class="level1">
503
503
<h1>Dashboards</h1>
504
504
<p>In this exercise, you will create a program that visualizes a data set of your choice in a dashboard. For this excercise, you can choose any data set of your interest. The data should be visualized in a dashboard with at least two plots. You can use one of the dashboard libraries we discussed in the lecture.</p>
<spanid="cb3-2"><ahref="#cb3-2" aria-hidden="true" tabindex="-1"></a><spanclass="co"># </span><spanclass="al">TODO</span><spanclass="co">: Create a program that visualizes a data set of your choice in a dashboard.</span></span>
521
518
<spanid="cb3-3"><ahref="#cb3-3" aria-hidden="true" tabindex="-1"></a><spanclass="co"># YOUR CODE HERE</span></span></code></pre></div><buttontitle="Copy to Clipboard" class="code-copy-button"><iclass="bi"></i></button></div>
0 commit comments