MB

PROG LANG MIDTERM

Lexical analysis - Reading the source code character from left to right & organizing them into tokens also known as regular expressions.

lexical analyzer - collects characters into logical groupings.

Tokens - words or symbols in a sentence, keywords, var, numbers.

Lexemes - sequence of characters matched by a pattern to form the token.

Syntax analysis/Parsing - process of analyzing a string of symbols according to the rules of formal grammar.

Camel Case - all words of a multipe-word name except the first are capitalized(myFirstCode, monthlySalaryPay).

Snake Case - words are written in lowercase and seprated by underscores(_).

Pascal Case - a naming convention wherein each word starts with a capital letter (PythonClass, ModelExample).

Function - Use lowercase words. Separate words by underscores to improve readability. This is called a snake case.

Variable - Use a lowercase single letter, word, or words. Separate words with underscores (_) to improve readability.

Class - Start each word with a capital letter. Do not separate words with underscores. This is called a Pascal case*.

Method - Use lowercase words. Separate words with underscores to improve readability (snake case).

Constant - Use an uppercase single letter, word, or words. Separate words with underscores to improve readability.

Module - Use a short, lowercase word or words. Separate words with underscores to improve readability.

Package - Use a short, lowercase word or words. Do not separate words with underscores.

Binding - is an association between an attribute and an entity. - occurs when a value is assigned to a variable.

Binding time - is the time a binding takes place

Type Bindings - variable must be bound to a data type before being referenced in a program.

Explicit declaration - Statement that lists variable names and specifies their particular type.

Implicit declaration - Associating variables with types through default conventions rather than statement

Dynamic type binding - Happens when the variable type is not specified by a declaration statement

Scope - The range of statements wherein the variable is visible.

Global Scope - Declared in the global scope are accessible from anywhere in the program

Local Scope - Declared inside a function or block are local and can only be accessed within that function

Enclosing Scope - This refers to the scope of a function that encloses another function.

Built-in Scope - Contains all the functions and variables that are built into Python