Q1. Compare Python and Java. Briefly discuss the features of Python programming.
- Python is interpreted and dynamically typed; Java is compiled and statically typed.
- Python uses simple, indentation-based syntax; Java uses verbose, curly brace syntax.
- Java generally offers faster execution due to its JIT compiler.
- Python is high-level, easy to learn, free, and open-source.
Answer: Python and Java are both widely used, high-level programming languages, yet they differ significantly in their underlying design and execution. Python is primarily an interpreted, dynamically typed language, where type checking occurs at runtime and code executes line by line. In contrast, Java is a compiled, statically typed language, requiring explicit type declarations and compilation into bytecode before execution by the Java Virtual Machine (JVM). Python's syntax is renowned for its simpli...