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. There are two types of parts: At the Place-exercises (Part 1, 3, 5) you create the list yourself - the check checks whether the data structure is correct. At the Calculator-exercises (Part 2, 4, 6) your program reads values input() a; the check feeds in fixed inputs and compares your output character by character. Therefore give there only what is required (no additional texts). The prompt in input("…") hides the test.

Part 1 — Create a list yourself

You determine the values - you don't have to read a list.

Exercise

  1. Make a list farben with three Favorite colors (strings) - the values you choose yourself, without any input().
  2. Output the entire list.

Do you choose e.g. B. the colors “red”, “blue” and “green” is the output ['rot', 'blau', 'gruen'] (the way Python displays a list). It is checked that farben is a list of three strings and is output unchanged.

Part 1 — Your Code

Loading Python…
Output

    

Part 2 — Output first element

Index 0 points to the first element.

Exercise

  1. Lis four integers one after the other with each int(input()) and collect them in a list.
  2. Pass only the first element the list - the first entry is at index 0.

In the inputs 5, 10, 15, 20 the output is exact 5.

Part 2 — Your Code

Loading Python…
Output

    

Part 3 — Element with append() add

Lists can be expanded later.

Exercise

  1. Make a list tiere with three Animals (strings) on — the animals you choose yourself, without input().
  2. Append a fourth animal with the method .append() to the list tiere on.
  3. Then output the list.

Do you start e.g. B. with ["Hund", "Katze", "Maus"] and append “bird,” is the output ['Hund', 'Katze', 'Maus', 'Vogel']. It is checked that tiere after appending four contains strings and is output unchanged.

Part 3 — Your Code

Loading Python…
Output

    

Part 4 — Output last element

With index -1 reach to the end.

Exercise

  1. Lis five integers one after the other with each int(input()) and collect them in a list.
  2. Pass only the last element the list — with the index -1 you reach for the end.

In the inputs 1, 2, 3, 4, 5 the output is exact 5. The index -1 always hits the last entry - no matter how long the list is.

Part 4 — Your Code

Loading Python…
Output

    

Part 5 — Replace the second entry

Assignment by index overwrites the old element.

Exercise

  1. Put the list namen with exactly these three entries (no input()): “Anna”, “Ben”, “Clara”.
  2. Replace that second entry (Index 1, previously "Ben") with another name of your choice - assign the new value to index 1 via assignment.
  3. Output the changed list.

If you replace “Ben” e.g. B. by “Tom”, becomes ['Anna', 'Ben', 'Clara'] the list ['Anna', 'Tom', 'Clara'] — the index starts at 0, so the second entry is at index 1. The check is that index 1 is no longer there Ben is and the list keeps three strings.

Part 5 — Your Code

Loading Python…
Output

    

Part 6 — Sum of the first three elements

Calculate multiple index accesses.

Exercise

  1. Lis four integers one after the other with each int(input()) and collect them in a list.
  2. Calculate the sum of the first three Elements (index 0, 1 and 2) — the fourth number is left out.
  3. Pass only this sum.

In the inputs 5, 10, 15, 20 the output is exact 30 — the fourth number counts not with.

Part 6 — Your Code

Loading Python…
Output

    

Report as PDF

Document and download your results.

Module overview

PartStatus
Part 1: Create a listOpen
Part 2: First ElementOpen
Part 3: appendOpen
Part 4: Last elementOpen
Part 5: Replace elementOpen
Part 6: TotalOpen

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.