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>
491
491
<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>
@@ -500,11 +500,21 @@ <h1>Tax refund for donations</h1>
<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. 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>
509
519
<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>
510
520
<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>
@@ -513,7 +523,7 @@ <h1>Text based adventure game</h1>
513
523
<sectionid="hangman" class="level1">
514
524
<h1>Hangman</h1>
515
525
<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>
519
529
<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>
@@ -522,7 +532,7 @@ <h1>Hangman</h1>
522
532
<sectionid="caesar-cipher" class="level1">
523
533
<h1>Caesar Cipher</h1>
524
534
<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>
<divclass="code-copy-outer-scaffold"><divclass="sourceCode cell-code" id="cb4"><preclass="sourceCode python code-with-copy"><codeclass="sourceCode python"><spanid="cb4-1"><ahref="#cb4-1" aria-hidden="true" tabindex="-1"></a><spanclass="co"># </span><spanclass="al">TODO</span><spanclass="co">: Create a programm able to encrypt and decrypt messages using the Caesar Cipher.</span></span>
527
537
<spanid="cb4-2"><ahref="#cb4-2" 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>
491
491
<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>
500
500
<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>
<p>In this exercise, you will create an <strong>interactive program</strong> that predicts a users future based on his or her answers. The program should ask <strong>5 questions</strong> about users where user can either add the answers in the terminal freely or choose from a number of options. It should then generate <strong>3 entertaining predictions, and save them to a separate file with the user name as filename.</strong> The predictions should be a <strong>5-year, 10-year, and 30-year prediction of where the user is going to be in life</strong>. Note, the program should be able to <strong>handle user input errors gracefully.</strong></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 predict the future.</span></span>
509
509
<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>
<spanid="cb4-2"><ahref="#cb4-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>
528
528
<spanid="cb4-3"><ahref="#cb4-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