CSC207H5 Lecture Notes - Lecture 1: Machine Code, Computer Hardware
Document Summary
The compiler-based approach (c/c++) before running, the human code is translated into machine code instructions which can be understood by the hosting computer"s hardware. (hardware dependent) When running, the computer hardware executes the machine code instructions. The interpreter-based approach (python) nothing done before running. When running, the human code is translated and executed on the go, one statement after another. Before running, the human code is translated into bytecode, a. k. a. the machine code for the. Java virtual machine. (hardware independent) when running, jvm executes the bytecode instructions. You already know python; that means you know most of the stuff already. Just need to learn about the differences and you"ll be ready to go. 8 months (csc108 + csc148) vs 8 days. In python, you can change the type of a variable dynamically. In java, every variable must be first declared with a particular type, and you"re not suppose to change the type afterwards. In python, scopes are indicated using indentation.