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.

Methods and Objects in Action

Four exercises: first a measurement series that calculates and introduces itself, then the dice simulation and a pressure sensor. Part 2 copies the code from part 1 with a button.

Part 1 — The class Messreihe

A list as an attribute and a method that calculates.

Exercise

Write the class Messreihe. The constructor receives name and messwerte and stores both in the attributes name and messwerte — the readings as its own list. The method mittelwert() returns the mean of the readings.

Example Messreihe("Druck", [1, 2, 3]).mittelwert() yields 2.0.

Part 1 — Your Code

Loading Python…
Output

    

Part 2 — The measurement series introduces itself

__str__ for readable output.

Exercise

Copy your class from part 1 and add the method __str__(). It returns a text that states the name, the number of values and the mean.

Example print(Messreihe("Druck", [1, 2, 3])) shows exactly Messreihe Druck: 3 Werte, Mittelwert 2.0.

Part 2 — Your Code

Loading Python…
Output

    

Part 3 — Simulating a pair of dice

Objects in a loop, running mean.

Exercise

The finished dice class from the experiment “Classes and Objects” is already in the editor. Below it, write the function simuliere_wuerfelpaar(anzahl, seed=0): it first calls numpy.random.seed(seed) , builds a four-sided and a six-sided dice and in every pass rolls the four-sided one first, then the six-sided one. It returns a list that, after each pass, contains the mean of all sums so far.

Example The first entry is the first sum; the second entry is the mean of the first two sums. For anzahl = 0 the list is empty.

Part 3 — Your Code

Loading Python…
Output

    

Part 4 — A pressure sensor that checks readings

A method that decides.

Exercise

Write the class Drucksensor(name, minimum, maximum, einheit="bar") and store all four values as attributes. The method ist_plausibel(wert) gibt True if the value lies between minimum and maximum, limits included. spanne() returns the difference between maximum and minimum, and __str__() introduces the sensor.

Example print(Drucksensor("P1", 0, 10)) shows Drucksensor P1: 0 bis 10 bar.

Part 4 — Your Code

Loading Python…
Output

    

Report as PDF

Document and download your solutions.

Module overview

PartStatus
Part 1: Measurement seriesOpen
Part 2: OutputOpen
Part 3: SimulationOpen
Part 4: Pressure sensorOpen

Not all parts are complete yet — the report can still be created.

Download PDF

Enter your name. The PDF contains your code, completion status, and a QR code for verification.