Save / load workspace

Save your lab results on this server for 48 hours. Use the token to continue on another device. Anyone who knows the token can open your workspace.

Save workspace

A name is required when you first save and is then permanently bound to this workspace. Task values, entries and progress are saved together.

Load workspace

New workspace

Start with empty results and a name of your choice. Previously saved tokens remain valid until they expire. Unsaved changes in this tab will be discarded.

Saving also transfers any included measurement files and analysis videos to this server. Running simulations are saved as a set of results and displayed in a paused state when loaded.

Programming task — enter your code and have it checked. In the first four parts you define the values yourself in the code - this is about creating, reading, replacing and adding to a dictionary. In part 5 and 6 are the values above input() read in and fixed entries fed in automatically; there the output is compared character by character, so give only what is required. input() was in the module Variables introduced.

Part 1 — Person

Create your own dictionary and build a sentence from it.

Exercise

  1. Create a dictionary person with the keys "name" and "alter" on. Choose the values yourself: a name (string) and an age (integer).
  2. Build a sentence of the form from this <name> ist <alter> Jahre alt. and output exactly this value — for "name": "Anna" and "alter": 20 therefore Anna ist 20 Jahre alt.

To do this, access the two values in the dictionary using the keys. Just output this one sentence.

Part 1 — Your Code

Loading Python…
Output

    

Part 2 — Car Brand

Only read a value using its key.

Exercise

  1. Create a dictionary auto with the keys "marke" and "farbe" on. Choose the values yourself (both strings).
  2. Lis just the value of "marke" about his key and give it out.

The output should contain exactly the brand name — not the color and not the entire dictionary.

Part 2 — Your Code

Loading Python…
Output

    

Part 3 — Changing the book

Overwrite an existing value.

Exercise

  1. Create a dictionary buch with the keys "titel" and "seiten" on. Give in "seiten" a first, old Page number (whole number). You choose the values yourself.
  2. Assign the key "seiten" then one new Page number and overwrite the old value.
  3. Pass only the new page value.

For "seiten": 120 and then overwritten 150 the output is 150 — not the old number.

Part 3 — Your Code

Loading Python…
Output

    

Part 4 — Expand the city

Add a new key.

Exercise

  1. Create a dictionary stadt with the keys "name" and "land" (both strings, chosen by yourself).
  2. Then add one to the dictionary new Key "einwohner" with an integer as a value.
  3. Build a set of the form from all three values <name> liegt in <land> und hat <einwohner> Einwohner. and output exactly that.

For "name": "Berlin", "land": "Deutschland" and supplemented "einwohner": 3800000 the output is Berlin liegt in Deutschland und hat 3800000 Einwohner.

Part 4 — Your Code

Loading Python…
Output

    

Part 5 — Check food

A dictionary value with if test.

Exercise

  1. Read with two input()-Call first Court of Justice with input() one, then one Price as a decimal number float(input()).
  2. Save both in a dictionary essen with the keys "gericht" and "preis".
  3. Use a case distinction to check whether the price actually greater than 10 is:
    • if yes, output: <gericht> ist teuer.
    • otherwise output: <gericht> ist guenstig.

For Pizza and 12 the output is Pizza ist teuer.; at Salat and 10 (exactly 10, so not bigger) Salat ist guenstig.

Part 5 — Your Code

Loading Python…
Output

    

Part 6 — Grade Point Average

Calculate with values from the dictionary.

Exercise

  1. Read three at a time input()-Call one Name with input(), then this Math note and the Info note each as a decimal number float(input()) there.
  2. Store everything in a dictionary schueler with the keys "name", "note_mathe" and "note_info".
  3. Calculate the average of the two grades as the sum of the two values divided by 2. Pay attention to the bracketing of the numerator and denominator and report / (not //) to create a decimal number.
  4. Pass only this average value.

In math = 2 and info = 3 the output is 2.5; at 2 and 2 arises 2.0.

Trailing zeros are allowed: 2.5 and 2.50 are graded equally. Do not round the average to fewer places here.

Part 6 — Your Code

Loading Python…
Output

    

Report as PDF

Document and download your results.

Module overview

PartStatus
Part 1: PersonOpen
Part 2: Car BrandOpen
Part 3: Change bookOpen
Part 4: Expand the cityOpen
Part 5: Check foodOpen
Part 6: Grade Point AverageOpen

Not all parts are completed yet - you can still create the report, which will then mark which parts are open.

Download PDF

Enter your name and download the report as a PDF.