-
Notifications
You must be signed in to change notification settings - Fork 255
Multiplication Table
Sar Champagne Bielert edited this page Apr 6, 2024
·
6 revisions
Understand what the interviewer is asking for by using test cases and questions about the problem.
- Will the number always be an integer?
- Yes.
Plan the solution with appropriate visualizations and pseudocode.
General Idea: Loop from 1 to 10, and print the result of multiplying by n
each time.
def multiplication_table(n):
for multiplicand in range(1, 11):
print(n * multiplicand)