Cognizant Interview Question

Python pattern codes and mostly base on my ML projects