Defining and Calling Functions in Python

Week5 Day1 of Learning Python — Understanding Functions Yesterday, I learned something simple but powerful about functions in Python: 👉 Defining a function is not enough. 👉 You must call the function for it to execute. Example: def greet(): print("Hello World") greet() # This is what actually runs the function Before now, I would define a function and wonder why nothing happened. Now I understand: • def creates the function • Calling it runs the function • Functions help organize code and avoid repetition It seems basic, but this concept changes how I structure programs. Every small concept builds the foundation for larger systems. On to the next lesson. #Python #DataScienceJourney #100DaysOfCode #WomenInTech #TechLearning

To view or add a comment, sign in

Explore content categories