Document
Document
Simple Sequence
Understand the flow of control in a simple sequence and how each statement is executed in order.
Create programs using mathematical operators for calculations that involve formulae.
Apply the ‘else’ statement to specify an alternative block of code when the condition is not met.
Utilise ‘elif’ to check multiple conditions in sequence, allowing for more complex decision structures.
Write Python programs using if, elif, and else to make decisions based on user input or data comparison.
Understand the importance of logical operators (e.g., and, or, not) in combining multiple conditions.
3. Nested if Statements
Understand the concept of nested if statements (i.e., placing one if statement inside another).
Write Python programs that use nested if statements to evaluate multiple layers of conditions.
Recognise when and why to use nested if statements in real-world programming problems.
Demonstrate the ability to control the flow of the program using nested conditions for more complex
decision-making.
Understand the concept of repetition and the need for loops in programming to reduce redundancy.
Write Python programs that use the for loop to repeat tasks a specific number of times.
Understand the use of range() function in conjunction with the for loop to generate sequences of
numbers.
Understand the importance of loop control variables and how to manipulate them within the loop.
TYPES OF QUESTIONS:
statement to enter the time in hours and convert it into minutes and seconds.
seconds)
cube numbers from (2-12) and continue the loop, to skip the value if variable
is equal to 7
10. Use 'for' statement with 'else' to design a scorecard program for a football tournament, enter the
names and scores of four players. If the name of the player matches the input, then print his score
otherwise print "No record found"
12. Make a program that uses if and nested if statements to check the age of a person.
the age is less than or equals to 60. If true, the person is eligible to work,
otherwise it prints, you are retired. If the age is not above 18, it prints
ineligible to work.