Q. Write a program that generates six random numbers in a sequence created with (start, stop, step). Then print the mean, median and mode of the generated numbers.
Answer =
import random import statistics start = int(input("Enter Start :-")) stop = int(input("Enter stop :- ")) step = int(input("Enter step :- ")) a = random.randrange(start,stop,step) b = random.randrange(start,stop,step) c = random.randrange(start,stop,step) d = random.randrange(start,stop,step) e = random.randrange(start,stop,step) f = random.randrange(start,stop,step) print( "Numbers are =",a,b,c,d,e,f ) print("Mean = ", statistics.mean( ( a,b,c,d,e,f ) ) ) print("Mode = ", statistics.mode( ( a,b,c,d,e,f ) ) ) print("Median =", statistics.median( ( a,b,c,d,e,f ) ) )
why there is no answers
ReplyDeleteIt is due to mistake. I will upload answer .
DeleteWhen will you upload??
ReplyDeleteSorry , Please check again I have uploaded it . : )
DeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )