Introduction
Explicit type annotation tells the computer exactly what kind of data a variable will hold. This helps avoid confusion and mistakes.
When you want to make your code clearer to others or yourself.
When the computer cannot guess the type on its own.
When you want to prevent accidental changes to the type later.
When you want to use a specific type instead of the default one.
When working with complex data or APIs that require exact types.