Source: https://www3.nd.edu/~apilking/Math10550/Lectures/Lecture%205%20Continuous%20Functions.pdf