1/19
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What is programming?
Writing and executing programs to solve problems practically.
Types of programming errors
Syntax errors, runtime errors (exceptions), logical errors.
What is an IDE?
Integrated Development Environment; a tool for writing and running code.
Example of an IDE
PyCharm, VSC
Definition of variables
Named storage locations that hold data of specific types.
Data types
int, float, String.
Casting
Converting data from one type to another, e.g., int(…), str(…).
Input function
input(…); reads user input as a String.
Output function
print(…); displays output to the user.
Operations on numbers
+, -, *, /, //, %, ** (addition, subtraction, multiplication, etc.).
String operations
len (length), concatenation (+), casting (str(…)).
min(), max(), abs()
Built-in functions for minimum, maximum, and absolute values.
Algorithm
A step-by-step procedure to solve a problem.
Steps in an algorithm
Analysis, design, coding, testing, debugging.
What is "pseudo-code"?
A high-level description of an algorithm.
What is the math module?
A library providing advanced mathematical functions like sqrt().
Syntax of a while loop
What is a syntax error?
An error caused by incorrect use of the programming language's rules (e.g., missing a colon in Python).
What is a runtime error?
An error that occurs during program execution, often due to invalid operations (e.g., dividing by zero).
What is a logical error?
An error where the program runs but produces incorrect results due to flawed logic or algorithms. %