Files
055-higher-lower/docs/wiki/Lecture-6-Final-Project.md
Tirsvad 1887fc347f Add lecture screenshots, README step overview and the three-language wiki
Screenshots are captured in a Docker container with a headless browser.

Task: MIL-004#1
Task: MIL-004#2
Task: MIL-004#3
Task: MIL-004#4
Task: MIL-004#5
2026-11-06 12:42:20 +08:00

1.1 KiB

English · Dansk · Bahasa Melayu

Lecture 6: Final project

3 is too low 7 is too high 5 is correct

Code: server.py and src/higher_lower/.

What we gained

  • Everything of the day in one program: routes, a variable URL section, HTML, styles and GIFs.
  • The secret number is chosen once when the app starts; /<int:guess> compares the guess with it.
  • Each answer has its own heading colour and GIF. The headings, colours and GIF addresses live in constants.py.
  • The rule that compares two numbers is a plain function in the domain layer, so tests do not need Flask.
  • Tests use the Flask test client with a fixed secret number and need no network.