Question: Write a Python program that uses functions , while or for loops to perform the following steps : - Prompts the user to enter two
Write a Python program that uses functions while or for loops to
perform the following steps :
Prompts the user to enter two positive integers that are greater than
one. The user enters firstNum followed by a secondNum firstNum
must be less than secondNum and it must be The program then
will do the following :
Display all even numbers between firstNum and secondNum
Display all odd numbers between firstNum and secondNum
Display the sum of all even numbers between firstNum and
secondNum
Display the sum of all odd numbers between firstNum and
secondNum
Display a message indicating whether the first number and the
second number are prime numbers.
Display the numbers and their squares between firstNum and
secondNum
Note: The first number and the second number are included and are
part of the calculations
Must use at least functions for the above operation
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
