human
Probability of rain on N + 1 th day | Function to find the probability.
count occurence of 1.
find probability.
Driver code"
Solution in Python:
 What is a code to probability of rain on N + 1 th day and the other steps required?
assistant
#Here is code to probability of rain on N + 1 th day and the other steps required.
 def rainDayProbability ( a , n ) :
	count = a . count ( 1 )
	m = count / n
	return m
if __name__ == " _ _ main _ _ " :
	a = [ 1 , 0 , 1 , 0 , 1 , 1 , 1 , 1 ]
	n = len ( a )
	print ( rainDayProbability ( a , n ) )