Question: Hello I am having trouble with this question I have for my programming class. Write a program which generates 20 random integers and indicates whether
Hello I am having trouble with this question I have for my programming class.
Write a program which generates 20 random integers and indicates whether each number is odd or even. The program should begin by asking the user to input two integers which will act as the range for the generation of 20 random integers.
The program should be created using a number of functions, with functions returning values where required. These function should include:
-
- a function to get input from the user
- a function which ensures the numbers are passed to randint() in the correct order, i.e. the smallest number first regardless of how they were inputted by the user.
- a function to generate a random integer
- a function to determine whether the numbers generated are odd or even.
- Note: The program should allow the user to input two integers regardless of whether the first is smaller or larger than the second
As well as making a IPO table for each function used excluding the main function.
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
