4 Matching Annotations
  1. Dec 2023
    1. 2 ways to execute code in this book-

      1. Activecode interpreter: Runs all the code at once. Can be edited while inputting.
      2. Codelens interpreter: Allows you to run code step by step. But cannot be edited while inputting.
    1. Lower level languages are easier for computers to understand as the instructions are given in binary or commands made of binaries. Higher level languages have to be processed before they can be run which takes some time. Python is a high level language.

      High Level Languages have certain advantages. They are-

      1. Easy to write: Programs are short, easily readable, more likely to be correct,
      2. Portable: They can be run on almost all computers with few to no modification.

      The processing of a high-level language is done via 2 programs - 
 1. Interpreter: Processes and executes the program bit by bit(not literally) 2. Compiler: Processes the whole program and then executes it.

      {Source code: Unprocessed code written in high-level language, Object code: Processed high level language code}

      Python uses both ways but because of how programmers interact with python, it’s ususally called a interpreted language. There are 2 ways to use the python interpreter -

      1. Shell mode: Can be used to write and execute small bits of code once at a time. Kind of like a scratch paper
      2. Program mode: Write a whole program and execute it.
      1. This book teaches you how to think like a programmer. Computer scientists are like engineers. They do their work using certain methods. This book will teach you those methods.

      2. The most important skill for a programmer to have is problem solving. Problem solving means identifying a problem, stating it in a clear way, prioritizing what to solve to get to the solution of the problem, finding alternative solutions and stating a solution that is clear and accourate. In this book we will learn to program, which will let us practise problem soving. And then we will use both of these skills for ourselves.

      1. The solutions we get from problem solving are called algorithms. They are step by step processes that if followed properly will lead to a solution.

      2. The target is to identify the algorithm to a problem and write it in a language that is understandable to a computer to automate the process. That language is a programming language and the automated process is a program.