human
Count ways to reach a score using 1 and 2 with no consecutive 2 s | A simple recursive implementation for counting ways to reach a score using 1 and 2 with consecutive 2 allowed.
base case.
For cases n > 2.
Driver code"
How can the above be solved in Python?

Give me a code to count ways to reach a score using 1 and 2 with no consecutive 2 s and the other steps required?
assistant
#Here is code to count ways to reach a score using 1 and 2 with no consecutive 2 s and the other steps required.
 def CountWays ( n ) :
	if n == 0 :
		return 1
	if n == 1 :
		return 1
	if n == 2 :
		return 1 + 1
	return CountWays ( n - 1 ) + CountWays ( n - 3 )
if __name__ == ' _ _ main _ _ ' :
	n = 5
	print ( CountWays ( n ) )