def multiplication_table(n):
print("Таблица умножения:")
print(" |", end="")
for i in range(1, n+1):
print(f" {i:2}", end="")
print("\n--+--" + "---"*n)
print(f"{i:2}|", end="")
for j in range(1, n+1):
result = i * j
print(f" {result:2}", end="")
print()
def addition_table(n):
print("Таблица сложения:")
result = i + j
n = 10
multiplication_table(n)
addition_table(n)
Copyright © 2025 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
def multiplication_table(n):
print("Таблица умножения:")
print(" |", end="")
for i in range(1, n+1):
print(f" {i:2}", end="")
print("\n--+--" + "---"*n)
for i in range(1, n+1):
print(f"{i:2}|", end="")
for j in range(1, n+1):
result = i * j
print(f" {result:2}", end="")
print()
def addition_table(n):
print("Таблица сложения:")
print(" |", end="")
for i in range(1, n+1):
print(f" {i:2}", end="")
print("\n--+--" + "---"*n)
for i in range(1, n+1):
print(f"{i:2}|", end="")
for j in range(1, n+1):
result = i + j
print(f" {result:2}", end="")
print()
n = 10
multiplication_table(n)
print()
addition_table(n)
https://znanija.com/task/53070168?utm_source=android&utm_medium=share&utm_campaign=question