python-tutorial
python-tutorial copied to clipboard
Issues with Functions
- [ ] Exercise 2, Part 3: The conversion factors between yd and ft to cm are wrong. Should be
yd/cm = 1/91.44 - [ ] Exercise 2, Part 1:
round(number, 2)will print 2 significant digits. If they printf"{result:.2f}", this results in 2 decimal places regardless. The wording is wrong. Significant digits isn't what you mean to say. It should probably just say round to 2 digits after the period. Example:
round(27.10, 2) # 27.1 (correct, because .10 has only 1 significant digit after the decimal separator)
num = 27.10
print(f"{num:.2f}") # 27.10 (still correct, but the very last 0 is redundant)
- [ ] Exercise "Longest consecutive sequence", the
solution_longest_sequence_bestis missing the reference solution, and we always get aKeyErrorwhen the testsuite is trying to fetch the reference solution's code