Question: Write a function file that gets a positive integer as input. Add up all the numbers from 1 to that number using a for loop.
Write a function file that gets a positive integer as input. Add up all the numbers from 1 to that number using a for loop. Return the calculated sum as the output from the function.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
