Created
February 27, 2023 18:14
-
-
Save prokopevivan/1f47d7abb63cc4c52c2361c24edff9e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def print_operation_table(operation, num_rows=6, num_columns=6): | |
for x in range(1, num_rows + 1): | |
nums = [] | |
for y in range(1, num_columns + 1): | |
num = operation(x, y) | |
nums.append(num) | |
print(*[str(x) for x in nums]) | |
print_operation_table(lambda x, y: x * y) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment