Tip calculator as outlined by introduction to Swift tutorial