Question: Total odd / even integers Write a program that implements a basic Python for loop and uses the range ( ) function. The program will

Total odd/even integers
Write a program that implements a basic Python for loop and uses the range() function. The program will input starting and ending integers and then iterate once through this range of integers, accumulating separate totals of all even and odd numbers.
The program's output should be as shown below. You may assume that the user will enter an ending integer that is greater than or equal to the starting integeltNote that the ending integer should be included in the range too.
Sample run: (inputs in bold)
Enter starting integer: 18
Enter ending integer: 35
The total of even integers from 18 to 35 is 234
The total of odd integers from 18 to 35 is 243
Total odd / even integers Write a program that

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!