Question: 7. Generate 1000 random integers from 0 to 1000. Count the number of these random integers which are i) odd and less than 500, ii)
7. Generate 1000 random integers from 0 to 1000. Count the number of these random integers which are i) odd and less than 500, ii) even and less than 500, iii odd and greater or equal to 500, and iv) even and greater or equal to 500. To do this, use a nested if-else-else construction, nested in a for loop. Print your results to the screen
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
