Madison E.

asked • 01/15/23

Python3 Programming Problem

Write a program that takes two integer values a,n as command line arguments separated by spaces. The arguments denote a range [0,a-1] and a modulus n. Your program should generate 10000 random numbers between 0 and a-1 (inclusive), applies a modulo n and prints out a list of the number of times each possible number 0..a-1 appeared, one number on each line. To check your work, if a=6 and you use a modulus of n=3, you should get all the results equally likely (roughly) but if n=5 you will not.


Hi there, I need help breaking down this coding problem and what it is asking

Judy R.

Hello I am 22 years experienced Online Tutor and Assignment Helper for Computer Science and Math. I have been teaching IT Professionals, students from different grades, and Graduate and Post Graduate students for more than 22 years. I am ready to help you with your learning requirements, assignments, tests, and projects. For further discussion about the assignment or project help you need, please add me on skype and my skype id is nettuitions Thanks
Report

01/22/23

2 Answers By Expert Tutors

By:

Judy R. answered • 01/22/23

Tutor
New to Wyzant

Bradley T. answered • 01/15/23

Tutor
5 (4)

Tutor for Python and High School and Middle School Math

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.