Answer to Question #306733 in Python for Dhea M. Maddela

Question #306733

Create a Python script that will generate random n integers from a given start and end of a range.


I need the code to have an output stated below:


Value for n : 5

Value for start : 1

Value for end : 10

10 8 7 8 3


1
Expert's answer
2022-03-07T07:11:23-0500
int n = int(input('Value for n:'))
int start = int(input('Value for start:'))
int end = int(input('Value for end:'))
for _ in range(n):
  print(random.randint(start, end))

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS