Answer to Question #314666 in Python for Chel

Question #314666

Develop a python application that will randomly select n intergers from 1 to 9 and will count and the numbers of accurance of the numbers without using the counter from collection library.







Sample output 1:







How many numbers?; 5







[4, 6, 8, 3, 3]







1-4







1-6







2-3







Sample output 2







How many numbers?: 7







[2, 6, 8, 2, 1, 1 , 6]







2-2







2-6







1-8







2-1






1
Expert's answer
2022-03-20T06:20:30-0400
import random
def pri_ran(x,y):
    return [random.randint(start, end) for _ in range(n)]

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