Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Random Average

import random


total = 0  
for i in range(10):  
    number = 1 + random.random()*4  
    print(number)  
    total += number  
print("Average =", total / 10)
Source by www.faculty.luther.edu #
 
PREVIOUS NEXT
Tagged: #Random #Average
ADD COMMENT
Topic
Name
9+6 =