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. Most parts read their values with them input() a: the check feeds in fixed inputs and compares your output line by line — so give only what is required (no additional texts). At part 7 you define the values yourself (none input()); There it is checked whether the function and the lists are structured correctly. input() you know from the “Variables” module.

Part 1 — Separate even and odd

Split the numbers read into two lists.

Exercise

  1. Read this first Number n as an integer (int(input())), after that n additional integers — one per input().
  2. Collect the even numbers in one list and the odd ones in a second list (even means: through 2 divisible without remainder, so z % 2 == 0) — in the order in which they were entered.
  3. Give in Row 1 the list of even numbers, in Row 2 the list of odd ones — e.g. B. [4, 2, 10] and below [7, 9, 13].
  4. Example: input 6 then 4 7 2 9 10 13 → [4, 2, 10] and below [7, 9, 13].

Part 1 — Your Code

Loading Python…
Output

    

Part 2 — Find the largest number

Maximum manual — without max().

Exercise

  1. Read this first Number n as an integer (int(input())), after that n additional integers — one per input().
  2. Determine which largest Number with a marker: set it to the first number and replace it as soon as a larger number comes up.
  3. Don't use max().
  4. Pass only the largest number from — at 5 then 3 17 5 12 8 therefore 17.

Part 2 — Your Code

Loading Python…
Output

    

Part 3 — Count grades

Collect frequencies in a dictionary.

Exercise

  1. Read this first Number n as an integer (int(input())), after that n Grades as whole numbers — one per input().
  2. Create an empty dictionary. If the note is already a key, increase its value by 1, otherwise put it with the value 1 on.
  3. Output the finished dictionary — e.g. B. {1: 2, 2: 3, 3: 1, 4: 1}.
  4. Example: 7 then 1 2 2 3 1 4 2 → {1: 2, 2: 3, 3: 1, 4: 1}.

Part 3 — Your Code

Loading Python…
Output

    

Part 4 — Sorting without sort()

Bubble sort with comparison and exchange.

Exercise

  1. Read this first Number n as an integer (int(input())), after that n integers — one per input() — and collect them in a list.
  2. Sort the list from small to large: compare adjacent elements in nested loops and swap them if the one on the left is larger than the one on the right.
  3. Don't use sort() or sorted().
  4. Output the sorted list — at 5 then 8 3 6 1 9 therefore [1, 3, 6, 8, 9].

Tip for swapping: Either cache with an auxiliary variable or, more briefly, with the Python tuple swap a, b = b, a.

Part 4 — Your Code

Loading Python…
Output

    

Part 5 — Check password list

Decide per input and output one line.

Exercise

  1. Read this first Number n as an integer (int(input())), after that n Passwords as text — one per input().
  2. Be specific for each password one line of: lang genug, if it has at least 4 characters (len(passwort) >= 4), otherwise zu kurz.
  3. Pay attention to the text and the limit (exactly 4 characters is “long enough”).
  4. Example: 4 then ab, test, hallo, xy → zu kurz / lang genug / lang genug / zu kurz.

Part 5 — Your Code

Loading Python…
Output

    

Part 6 — Calculating Averages

Read and calculate multiple data sets.

Exercise

  1. Read this first Number n the student as a whole number (int(input())).
  2. Then read per student successively three values with one each input(): the Name as text (input()), Note 1 and Note 2 each as a decimal number (float(input())).
  3. Calculate the average as (Note 1+ grade 2) divided by 2 and give exactly per student one line in the form Name: Durchschnitt from — e.g. B. Mia: 3.0 (name, colon, space, then the average).
  4. Example: 2, then Mia 2 4 and Tom 2 3 → Mia: 3.0 / Tom: 2.5.

Part 6 — Your Code

Loading Python…
Output

    

Part 7 — Squares of a List

Define a function and apply it to each list element - here without input().

Exercise

This exercise will not read in: you set the numbers yourself. The core is that Define the function and that Images (Mapping) via a list.

  1. Write a function named quadrat, the a number receives and its square (the number times itself) return.
  2. Leg yourself a list with the name zahlen with at least three integers (e.g. B. [2, 4, 6, 8]).
  3. Calls quadrat in a loop for each number and collect the results in a new list named quadrate.
  4. Give the list quadrate from — with the numbers [2, 4, 6, 8] therefore [4, 16, 36, 64].

Part 7 — Your Code

Loading Python…
Output

    

Part 8 — Doubling to the limit

Iterative approximation with while.

Exercise

  1. Read that Date as an integer (int(input())).
  2. Double the value in one while loop while it smaller than 100 is (that is, until it is at least 100 reached), and count the steps.
  3. Give in Row 1 the final value, in Row 2 the number of steps - i.e. two lines with a number each.
  4. Example: starting value 7 → 112 and below 4.

Part 8 — Your Code

Loading Python…
Output

    

Report as PDF

Document and download your results.

Module overview

PartStatus
Part 1: SplitOpen
Part 2: MaximumOpen
Part 3: CountingOpen
Part 4: SortingOpen
Part 5: PasswordsOpen
Part 6: AveragesOpen
Part 7: SquaresOpen
Part 8: ApproximationOpen

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.