Below you will find pages that utilize the taxonomy term “lesson 10”
November 3, 2024
Learn to Code In 5 Minutes A Day: Lesson 10
Lesson 9 Solution: Refactoring Yesterday’s exercise was to see if you could figure out a way to refactor our code so far. In other words, we wanted to see if we could simplify this code:
func roman(number int) string { if number == 3 { return "III" } if number == 2 { return "II" } return "I" } The way we do this is with a loop. A loop lets us repeat things over and over and is one of the fundamental tools of programming.
read more