b7 Algorithm
b7 Algorithm
PROGRAMMING
CONCEPTS
SEQUENCE, SELECTION, ITERATION, AND
ALGORITHMIC THINKING
SEQUENCE, SELECTION, AND
ITERATION
• Example of sequence:
• 1 → 2 → 3 → 4 → 5 → 6 → 7 → 8 → 9 → 10
WRITING DAILY ITINERARY IN SEQUENCE
12. Prepare for Bed – Brush teeth, set alarm, and relax.
Example:
Scenario
John lives in the city and needs to travel to work every morning.
He has multiple transport options available, and regardless of
which option he chooses, he will still reach his workplace.
Outcome
Example:
Problem Statement
Explanation of Iteration.
It helps in:
Example:
if numbers[index] == target:
ascending_order = sorted(numbers)
# Display results