Skip to content
This repository was archived by the owner on Jan 9, 2023. It is now read-only.

Latest commit

 

History

History

core_lesson1

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Lesson 1 - How to Talk to the Computer

Ch2 What is programming

  • Programming is not only coding
    • Involves three elements
      • Understanding and Formulating the problem
      • Designing an algorithm to solve the problem
      • Implementing the algorithm
  • Machine code is what the computer understands
    • Writing machine code for humans will be tedious
  • Translators convert high-level languages to low-level languages
    • Compilers pre-translate codes, then executes
    • Interpreters translate and execute code line by line
  • Programming languages need to be unambiguous
  • Spend more time thinking about the problem and developing a clear algorithm before coding

Ch3-5 Designing and improving a guessing game

  • While designing an algorithm, we can use
    • List of steps
    • Pseudo-code
    • Flow chart
  • Structured program basic building blocks
    • Simple statement
    • Selection
      • if-else statement
    • Repetition
      • while block
  • Use variables as constants
    • Easier to maintain
    • Future proof