logo CodeStepByStep logo

print_random

Language/Type: Python for random numbers
Related Links:
Author: Allison Obourn (on 2017/08/29)

Write a function named print_random that takes a number as a parameter and outputs that many random numbers between 1 and 10 inclusive. For example, the call print_random(3) might output:

number 1 : 5
number 2 : 9
number 3 : 4

(Because this problem uses random numbers, our test cases check only the general format of your output. You must still examine the output yourself to make sure the answer is correct.)

Function: Write a Python function as described, not a complete program.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.