Cognizant Interview Question

Intro Python basics Apti question easy Python code on one of my apti question,(sum of natural number)