Hoppa till innehåll

Exercises and media

This page shows how exercises, recorded lectures, and diagrams are presented on the course site.


<Exercise> renders one exercise as an inline link with a difficulty badge — use it when a single exercise doesn’t warrant a full list, for example inline in a paragraph.

UppvärmningHello, World!Lösningsförslag

<ExerciseList> takes a list of exercises and shows each difficulty level as a labeled Badge:


<Youtube> embeds a YouTube video with a responsive 16:9 layout.

Here, a video is combined with a :::caution box to flag outdated material in the recording:


Mermaid renders diagrams directly from text. Three examples:

sequenceDiagram
participant Browser
participant Server
Browser->>Server: GET /api/data
Server-->>Browser: 200 OK + JSON
Browser->>Browser: Update DOM
classDiagram
class Animal {
+String name
+int age
+speak() String
}
class Dog {
+fetch()
}
class Cat {
+purr()
}
Animal <|-- Dog
Animal <|-- Cat
flowchart TD
A[Start program] --> B{Valid input?}
B -- Yes --> C[Compute result]
B -- No --> D[Show error message]
C --> E[Print answer]
D --> F[Ask for new input]
F --> B
E --> G[Exit]
CCBY