return programming

if n>=0: 

Here is what the above code is Doing:
1. It’s checking if the number is positive or negative.
2. If the number is positive, it’s adding up all the numbers from 1 to n.
3. If the number is negative, it’s subtracting all the numbers from n to 1.
4. Finally, it’s returning the sum.

You can test the function by calling it like this:

# Should return 55
# Should return -55