Assume you are given an integer variable named n (you may assume n is at least 1). Create a variable named total that holds the sum of all integers from 0 up to and including n - 1 — that is, 0 + 1 + 2 + ... + (n - 1).
Use a for loop together with range.