Define:
Algorithm:
A step-by-step procedure for solving a problem accomplishing some end
Ex: Recipe, assembly instructions, pseudocode, flowchart
What are the flowchart instructions?
Define
Program:
Translation of the algorithm using programming languages
Structure and details crucial
Define
Programming Languages
Formal languages designed communicate instructions to a computer
Low-Level vs. High-Level
Programs translate high to machine language:
Differentiate
“Low-Level” and “High-Level” Programming Languages
Categories:
1. *Machine language*: Directly understood computer & needs no translation (0100111100) 2. *Assembly language*: Easier humans understand than machine codes
Define
Compiler
Define
Interpreters
What is “Python”?
(1) High-level language & (2) interpreted language & (3) named after Monty Python
Advantages:
Define
Integerated Development Environment (IDE)
A program can be written using: An Integrated Development Environment (IDE) → Thonny ex
Define
“Statement”
Ex: Print Statement
// “print statement” use to disply specific stat
print(“Hello World!”)
Code
Comments (#)
#)Function:Define
Bugs and Debugging
Bugs: Incorrect/unexpected results & process tracking down mistake ⇒ Debugging
Define & Code
Escape Sequences
Escape sequences: sequence characters represents special character
(1) \n represents character “newline”
(2) \” or \’ represent quotation mark
(3) \t represents a tab
Define
Values
Basic things a program works with like n letter or num
- 2: integer
- 42.0: floating number point
- “Hello world”: string
If not sure about type of value; use type() to find out