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.

Branches (if/elif/else)

Programming task — enter your code and have it checked. Most parts read a value input() a and classify it; the check feeds in fixed inputs and compares your output character by character. Therefore give only what is required (no additional texts). Part 3 is different: here you define the value yourself — none input(). Like input() works, it says in the instructions.

Part 1 — Is the number greater than 10?

if with else.

Exercise

  1. Read a whole number int(input()) there.
  2. Is the number greater than 10, give exactly groesser als 10 out — otherwise, give exactly nicht groesser als 10 out.

Pay attention to the limit: 10 is not greater than 10. Use one if with else — you write the branch yourself.

Example: input 12 → Output groesser als 10; Input 10 → Output nicht groesser als 10.

Part 1 — Your Code

Loading Python…
Output

    

Part 2 — Positive or not?

if with else — Be careful with the 0.

Exercise

  1. Read a whole number int(input()) there.
  2. Is the number greater than 0, give exactly positiv out — otherwise, give exactly nicht positiv out.

Use one if with else. Pay attention to those 0: it is not positive and therefore must nicht positiv lead.

Example: input 7 → positiv; Input -4 → nicht positiv; Input 0 → nicht positiv.

Part 2 — Your Code

Loading Python…
Output

    

Part 3 — Even or Odd?

if/else with modulo — here without input().

Exercise

  1. Define yourself an integer variable zahl with a value of your choice (e.g. B. 8) — you have to here nothing read.
  2. Check with that Modulo operator %, whether zahl is even: a number is even if it is The remainder when divided by 2 is 0 is.
  3. ACT. zahl even, give exactly gerade off, otherwise exactly ungerade. The branch (if/else) you write yourself.

The test checks that zahl is an integer and your output (gerade/ungerade) matches the parity of your value — no matter what value you choose. Example: zahl = 8 → gerade, zahl = 7 → ungerade.

Part 3 — Your Code

Loading Python…
Output

    

Part 4 — Convert a grade into an assessment

if/elif/else with multiple branches.

Exercise

  1. Read a note as a whole number int(input()) there.
  2. Translate the grade into the appropriate evaluation word (without umlauts) and print it out exactly like this: 1 → sehr gut, 2 → gut, 3 → befriedigend, 4 → ausreichend, 5 → mangelhaft, otherwise (note 6) → ungenuegend.

Use one for this if, several elif and a final one else — you write the branches yourself.

Example: input 2 → exactly gut (not sehr gut — that would be grade 1); Input 6 → ungenuegend.

Part 4 — Your Code

Loading Python…
Output

    

Part 5 — Morning, Noon or Evening?

Multiple elif with overlapping Conditions - the order counts.

Exercise

  1. Read a time (full hour) as a whole number int(input()) there.
  2. Is the time smaller than 12, give exactly Morgen output; if it is less than 18, give exactly Mittag off; otherwise give exactly Abend out.

Include that if/elif/else around. Examples: 8 → Morgen, 14 → Mittag, 20 → Abend.

The order of the branches is crucial here: The test “less than 12” must before "smaller than 18". Otherwise, e.g. 8 (even smaller than 18) incorrectly Mittag — this is exactly the case that is being examined.

Part 5 — Your Code

Loading Python…
Output

    

Part 6 — Child, Adolescent or Adult?

Age groups with three branches.

Exercise

  1. Read an age as a whole number int(input()) there.
  2. Is the age less than 13, give exactly Kind off; it is less than 18, give exactly Jugendlicher off; otherwise give exactly Erwachsener out.

Include that if/elif/else around. Examples: 8 → Kind, 16 → Jugendlicher, 40 → Erwachsener. Note the limit: 13 is already Jugendlicher (no longer smaller than 13) — this case will also be checked.

Part 6 — Your Code

Loading Python…
Output

    

Report as PDF

Document and download your results.

Module overview

PartStatus
Part 1: > 10?Open
Part 2: Positive?Open
Part 3: Even/OddOpen
Part 4: GradesOpen
Part 5: Time of DayOpen
Part 6: Age groupOpen

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.