#Mathematics


Summation Calculator

This code can add all integers, between 2 distinct integers, including negative integers, in increments of your choice, no matter which order the distinct integers are places in.

import math print("Welcome to the summation calculator") a = int(input("Please enter first number")) b = int(input("Please enter second number")) c = int(input("Please enter what increments to skip count by")) if a > b and c >= a: print("Sorry, your increment is not valid") elif b > a and c >= b: print("Sorry, your increment is not valid") elif a == b: print("Sorry, your values are equal") elif a > b: d = int(sum(range(b, a, c))) print(d) elif b > a: g = int(sum(range(a, b, c))) print(g)
1