So I am a beginner in python and was given an exercise to find the mean of 6 randomly generated 6-digit numbers. I applied a logic that I can run it through a while loop and get 6 random variables and then get them in a tuple and then find its mean. but I cant get them in a tuple. I don't know what is wrong. PLS HELP!!
and the error its giving me is given after the code that I wrote
import random as r
import statistics as s
i=1
tup=()
while i<=6:
x=r.randrange(100000,999999,500)
tup()==(tup,x)
i=i+1
print(x)
y=s.mean(tup())
print(y)
Error:-
Traceback (most recent call last):
File "D:/personal/python programs/siuuu.py", line 85, in <module>
tup()==(tup,x)
TypeError: 'tuple' object is not callable