-
Notifications
You must be signed in to change notification settings - Fork 244
Multiples of Five
Sar Champagne Bielert edited this page Apr 8, 2024
·
5 revisions
Unit 1 Session 2 (Click for link to problem statements)
Understand what the interviewer is asking for by using test cases and questions about the problem.
Plan the solution with appropriate visualizations and pseudocode.
General Idea: Loop from 5 to 100, stepping up by 5 each time.
- Make sure your loop doesn't exclude the last value (100).
# Output:
# 5
# 10
# 15
# 20
# 25
# 30
# 35
# 40 ....
# 100
def multiples_of_five(start, stop):
for num in range(5, 101, 5):
print(num)