Python:def sum_range(start, end):
if start > end:
start, end = end, start
return sum(range(start, end + 1))
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Python:
def sum_range(start, end):
if start > end:
start, end = end, start
return sum(range(start, end + 1))