Q4Numerical3 Marks10 May 2026
Consider the following Python code snippet:
```
def f_count(lst):
if not lst:
return 0
result = 1 if lst[0].isupper() else 0
if len(lst) == 1:
return result
return result + f_count(lst[1:-1]) + (1 if lst[-1].isupper() else 0)
result = f_count(['A', 'b', 'C', 'd', 'E', 'f', 'G'])
print(result)
```
What is the output of the program? Enter an integer as your answer.
Press Enter to check.