#4 Python Function Tutorial | Learn How to Use Default Parameters in Function Definition

Опубликовано: 06 Октябрь 2024
на канале: Muhammad Yasir Bhutta
355
8

In this beginner-level Python tutorial, you'll learn how to create a personalized greeting message using the function greet().

The greet() function takes an optional argument name which defaults to "friend" if no name is provided.

In this example, the function is called without passing any argument, so it will print "Hello, friend!" to the console.

You can customize the message by passing a name argument to the greet() function. Follow along with the code and try it out for yourself!

If you enjoyed this video, please give it a thumbs up 👍and leave a comment 💬 below. Don't forget to subscribe 🔔to my channel for more Python tutorials like this one.

YouTube Playlists:

Python for beginners:    • Python Tutorial for Beginners  
Learn Microsoft Excel:    • Excel 365 Tutorial for Beginners [lat...  

You can also follow me on:

Website: https://yasirbhutta.github.io/
Facebook:   / yasirbhutta786  
YouTube:   / @yasirbhutta  
Twitter:   / yasirbhutta  

Thanks for watching! 🙏**

#codingshorts #coding #pythonbasics #pythonprogramming #codingshortvideo #codingshortvideo #codinglife #python #pythontutorial #yasirbhutta