Question: ** Python** Write a short python program to create 1000 random integers in the range between 1 and 10. There is a file posted below

** Python**

  • Write a short python program to create 1000 random integers in the range between 1 and 10. There is a file posted below (HigherLower.py) that you can use, there are only a few locations in the file where you have to add code. For all the labs, please try to take the most straightforward approach possible, with minimal lines of code.
  • Count the number of times a number is smaller than or equal to five or not
  • Print the result. The numbers for higher and lower counts should be roughly the same
  • Submit a screenshot of the printed result

Following is the code for HigherLower.py code

import time import random

higher = 0 lower = 0

INSERT CODE TO SEED YOUR RANDOM NUMBER GENERATOR

#create 1000 integer random numbers for i in range (SPECIFY RANGE): CREATE RANDOM NUMBER BETWEEN 1 AND 10 if number > 5: INCREMENT COUNTER FOR HIGHER else: INCREMENT COUNTER FOR LOWER

PRINT RESULT

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!