1/13
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
What are the 4 file modes in file handling?
r = Read file, w = Write (creates/overwrites), a = Append (adds to file), open() = Opens file.
When do we use an if statement?
Used when a condition must be checked.
What are logical operators?
Used to combine conditions.
What is a nested if?
An if inside another if.
What are the 3 parts of a function?
Function Definition, Parameters, Function Call, Return Value.
What is a while loop?
Repeats while condition is True.
What is a sentinel value?
A special value that stops a loop.
What is a nested loop?
A loop inside another loop.
What is input validation?
Ensures correct user input.
What errors can appear in programming?
Syntax Error: Code written incorrectly; Logic Error: Program runs but answer is wrong.
What business calculations may appear?
VAT, Discount, Penalty.
What is the IPO principle?
I โ Input, P โ Processing, O โ Output.
How do I answer programming questions?
Identify inputs, calculations, decisions, and required output; then write INPUT โ PROCESS โ OUTPUT.
Before submitting a program, what should you check?
Inputs collected, variables named properly, functions used, decisions made correctly, loops end correctly, output displays correctly, files opened/closed, no syntax errors, tested with different values.