Practice small sample Programming question