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.

Parts 1–4 and part 6 read input using input() You can enter values yourself when running the code; the tests use predefined inputs. Output only the requested results. In part 5, choose the upper limit yourself.

Part 1 — Count up to n

A simple counting loop with an upper limit read in.

Exercise

  1. Read a whole number n a (int(input())).
  2. Write one while-Loop that starts with a counting variable 1 starts and all numbers from 1 to n with print() outputs — each on its own line, in ascending order.

When entering 5 so should 1, 2, 3, 4, 5 (one line each). Only output these numbers.

Part 1 — Your Code

Loading Python…
Output

    

Part 2 — Count backwards from n

The other direction — how does the condition change?

Exercise

  1. Read a whole number n a (int(input())).
  2. Write one while-Loop that starts with a counting variable n starts and all numbers from n down to 0 outputs — each on its own line, in descending order.

When entering 3 so should 3, 2, 1, 0 (one line each). Only output these numbers.

Part 2 — Your Code

Loading Python…
Output

    

Part 3 — Sum from 1 to n

Battery batteries.

Exercise

  1. Read a whole number n a (int(input())).
  2. Set a counting variable (Start 1) and a sum variable (Start 0).
  3. Write one while-Loop that runs as long as the counting variable <= n is. In the block, add the counting variable to the sum and then increase the counting variable by 1.
  4. Pass after the loop only the sum with print() out.

When entering 5 is the sum 1+2+3+4+5 = 15, at 10 it is 55. Just output that one number.

Part 3 — Your Code

Loading Python…
Output

    

Part 4 — Doubling

Loop with variable condition.

Exercise

  1. Read two positive integers: first a Date, then one Border (two int(input())).
  2. Write one while-Loop with a counting variable that starts at the start value and as long as runs as it <= the limit is.
  3. Output the counting variable in each run (separate line) and then multiply it by 2, so it doubles with each run.

At start value 2 and border 50 results in that 2, 4, 8, 16, 32 (one per line). Once the value exceeds the limit, do not output it. Output only these numbers.

If the starting value equals the limit, print it exactly once. If the starting value exceeds the limit, print nothing.

Part 4 — Your Code

Loading Python…
Output

    

Part 5 — Even Number List

Step size ≠ 1 — build a list yourself.

Exercise

Here you read nothing but set the values yourself.

  1. Choose one yourself even Upper limit and assign it to a variable n to (e.g. B. the value 10).
  2. Build with one while-Loop a list with the name gerade on that all even numbers of 2 up to (including) n contains. Idea: Start at 2, append the current counter to the list and then increment it each time 2.
  3. Give the finished list gerade at the end.

At the upper limit 10 arises e.g. B. the output [2, 4, 6, 8, 10]. Which even number you choose is up to you - it is checked that the list is constructed and output correctly.

Part 5 — Your Code

Loading Python…
Output

    

Part 6 — Check a password

Read input, compare it and ask again after an incorrect attempt.

Exercise

  1. Set the predefined password using PWD = "1234" as the assignment.
  2. Read along input() to read a password attempt. Compare the input as a string with PWD.
  3. While the input is incorrect, output Falsches Passwort and ask for the password again inside a whileloop.
  4. Once the password is correct, the loop ends. Then output the following once: Login ok out.

When you run the code, an input dialog opens for each attempt. Try an incorrect password first, then the correct one. If the first input is correct, no error message appears.

Part 6 — Your Code

Loading Python…
Output

    

Report as PDF

Document and download your results.

Module overview

PartStatus
Part 1: Count upOpen
Part 2: BackwardsOpen
Part 3: TotalOpen
Part 4: DoublingOpen
Part 5: Even Number ListOpen
Part 6: PasswordOpen

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.