Question: Write python code for the following task: Write a program to perform the following series of steps: i. Prompt the user to enter 2 integers:
Write python code for the following task:
Write a program to perform the following series of steps:
i. Prompt the user to enter 2 integers: first and second. Make sure the first is less than the second number and allow the user to enter a valid set of numbers. This is a simple loop.
ii. Display all the even numbers between first and second.
iii. Calculate and display the total of all even numbers between first and second.
iv. Display all the odd numbers between first and second.
v. Calculate and display the total of all odd numbers between first and second.
vi. Display the numbers, their squares and their cubes for all the numbers between first and second, with steps of 1. Clearly explain the output.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
