Question: Write a function avgNum ( n ) that receives a positive integer n as its input argument. Your function will generate n random integers in

Write a function avgNum(n) that receives a positive integer n as its input argument. Your function will generate n random integers in range of [1, n](include 1 and n) and calculate their average as the return value. Save your code in Problem3.py
Requirement:
input validation for n Use random library

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 Programming Questions!