01 — Podstawy Go (:=, if, switch, for, multiple return values)
Zadania (basics.go)
CelsiusToFahrenheit(c float64) float64—F = C \cdot 1.8 + 32.ClassifyScore(score int) string—switchbez warunku:0..49->"fail",50..74->"pass",75..89->"good",90..100->"excellent", inaczej"invalid".SumUpTo(n int) int— suma1..nwłącznie (dla<= 0zwróć0).DivMod(a, b int) (int, int, bool)— zwróć(iloraz, reszta, true)lub(0, 0, false)przyb == 0.
Uruchomienie testów
make test PKG=./exercises/01-core/01-basics