class Distribution:
	
	def __init__(self, mu=0, sigma=1, skewness=0, kurtosis=0):
	
		""" Generic distribution class for calculating and 
		visualizing a probability distribution.
	
		Attributes:
			mean (float) representing the mean value of the 
			distribution stdev (float) representing the standard 
			deviation of the distribution data_list (list of floats) 
			a list of floats extracted from the data file.
			"""
		
		self.mean = mu
		self.stdev = sigma
		self.skew = skewness
		self.kurt = kurtosis
		self.data = []


	def read_data_file(self, file_name):
	
		"""Function to read in data from a txt file. The txt file should 
		have one number (float) per line. The numbers are stored in the 
		data attribute.
				
		Args:
			file_name (string): name of a file to read from
		
		Returns:
			None
		
		"""
			
		with open(file_name) as file:
			data_list = []
			line = file.readline()
			while line:
				data_list.append(float(line))
				line = file.readline()
		file.close()
	
		self.data = data_list
		

	def plot_histogram(self):
		"""Function to output a histogram of the instance variable data 
		using matplotlib pyplot library.
		
		Args:
			None
			
		Returns:
			None
		"""
		plt.hist(self.data)
		plt.title('Histogram of Data')
		plt.xlabel('data')
		plt.ylabel('count')