Back-To-School Deals - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Function basics
More advanced concepts
Summary

## Instruction

Perfect! Now, it's your turn to write a function that returns None.

## Exercise

Write a function named sum_between that will take two arguments – a and b – and will return the sum of all integers from a to b (inclusive). For instance:

sum_between(1, 4) = 1 + 2 + 3 + 4 = 10


However, if b < a, return None. Test your function by computing the sum of numbers between 1 and 3.

### Stuck? Here's a hint!

Use a loop:

for i in range (a, b+1):