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

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

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 Databases Questions!