python-tutorial icon indicating copy to clipboard operation
python-tutorial copied to clipboard

Errors found in `functions`

Open despadam opened this issue 1 year ago • 5 comments

See remaining issues from https://github.com/empa-scientific-it/python-tutorial/pull/251

Also see #269 about exercises on scopes.

despadam avatar Nov 28 '24 08:11 despadam

In calculate basic area fix text description that we expect 6.0 instead of 6.00 because the test will check for 1 digit only.

despadam avatar Nov 28 '24 10:11 despadam

In Exercise 2, we should specify that we are always dealing with floats, never integers. Fix the example line:

Example: length=2, width=3, unit="m" should return "60000.0 cm^2" (because 2m × 3m = 6m² = 60000cm²)

to

Example: length=2.0, width=3.0, unit="m" should return "60000.0 cm^2" (because 2m × 3m = 6m² = 60000cm²)

edoardob90 avatar Nov 28 '24 10:11 edoardob90

In solution calculate area with yards, feet etc, the wrong reference solution was printed.

despadam avatar Nov 28 '24 10:11 despadam

Exercise 2, Part 3: add a test that checks if a wrong unit is passed.

edoardob90 avatar Nov 28 '24 11:11 edoardob90

In Exercise 2: in the text (part 2 and 3), make it clear that the default unit is always cm

edoardob90 avatar Nov 28 '24 12:11 edoardob90