L1-L3
IDE: Integrated Development Environment, where code is written (e.g., Pycharm, Spyder, Thonny, Online GDB, Pyscripter).
Syntax: Arrangement of words and phrases to create well-formed sentences in a language.
Syntax Errors: A character or string incorrectly placed in a command or instruction that causes a failure in execution.
Run-Time Errors: Detected errors while the program is running.
Name Errors: When a variable or function is not found.
Print: Prints a string.
Input: Allows user to enter a string or integer.
Str: Turns an integer into a string (use only if integer is added to another string).
Example: print("My grade in Chem is " + str(2))
Int: Identifies an integer.
Example:
x = 10
if isinstance(x, int):
print("Integer")
else:
print("Not Integer")
Function: A sub-program that performs a specific task.
Function Body: The block of code after the function header.
Def: The first word in the function header.
Colon (:): Must appear at the end of the function header.
Built-in Functions: Functions that come as part of Python.
Function Call: A special line that causes the flow of control to switch to the first line inside the function body.
Flow of Control: The sequence in which lines of code are executed.
Function Definition: A function header and a function body.
Modular Functions: Break tasks into smaller functions (e.g., drawing shapes or numbers like "365").
Variables: Memory locations used to store data; named by the programmer.
Assignment Operator (=): The equal sign; it assigns the value on the right-hand side to the variable on the left-hand side.
Example: sum = firstNumber + secondNumber
Expressions: Can be a literal value or a combination of values and operators (e.g., firstNumber + secondNumber
).
Arithmetic Operators:
+
(Addition)
-
(Subtraction)
*
(Multiplication)
/
(Division)
Start with a letter or underscore (_), not a digit.
Contain only letters, digits, or underscores (no spaces or special characters).
Be case-sensitive (ISBN and isbn are different).
Avoid reserved keywords like print
or def
.
IDE: Integrated Development Environment, where code is written (e.g., Pycharm, Spyder, Thonny, Online GDB, Pyscripter).
Syntax: Arrangement of words and phrases to create well-formed sentences in a language.
Syntax Errors: A character or string incorrectly placed in a command or instruction that causes a failure in execution.
Run-Time Errors: Detected errors while the program is running.
Name Errors: When a variable or function is not found.
Print: Prints a string.
Input: Allows user to enter a string or integer.
Str: Turns an integer into a string (use only if integer is added to another string).
Example: print("My grade in Chem is " + str(2))
Int: Identifies an integer.
Example:
x = 10
if isinstance(x, int):
print("Integer")
else:
print("Not Integer")
Function: A sub-program that performs a specific task.
Function Body: The block of code after the function header.
Def: The first word in the function header.
Colon (:): Must appear at the end of the function header.
Built-in Functions: Functions that come as part of Python.
Function Call: A special line that causes the flow of control to switch to the first line inside the function body.
Flow of Control: The sequence in which lines of code are executed.
Function Definition: A function header and a function body.
Modular Functions: Break tasks into smaller functions (e.g., drawing shapes or numbers like "365").
Variables: Memory locations used to store data; named by the programmer.
Assignment Operator (=): The equal sign; it assigns the value on the right-hand side to the variable on the left-hand side.
Example: sum = firstNumber + secondNumber
Expressions: Can be a literal value or a combination of values and operators (e.g., firstNumber + secondNumber
).
Arithmetic Operators:
+
(Addition)
-
(Subtraction)
*
(Multiplication)
/
(Division)
Start with a letter or underscore (_), not a digit.
Contain only letters, digits, or underscores (no spaces or special characters).
Be case-sensitive (ISBN and isbn are different).
Avoid reserved keywords like print
or def
.