How to Build Logic in Python Programming: A Guide for Beginners