InterviewSolution
| 1. |
What is a dynamically typed language? |
|
Answer» Before we understand a dynamically TYPED language, we should learn about what typing is. Typing refers to type-checking in programming languages. In a strongly-typed language, such as Python, "1" + 2 will result in a type error since these languages don't allow for "type-coercion" (IMPLICIT conversion of data types). On the other hand, a weakly-typed language, such as Javascript, will simply output "12" as result. Type-checking can be DONE at two stages -
Python is an INTERPRETED language, executes each statement line by line and thus type-checking is done on the fly, during execution. Hence, Python is a Dynamically Typed Language. |
|