Introduction
Optional parameters let you call a function without giving all the details every time. This makes your code simpler and more flexible.
When a function can work with or without some information.
When you want to give a default behavior if some details are missing.
When you want to avoid writing many versions of the same function.
When you want to make your code easier to read and use.
When you want to handle extra options without forcing them.