mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 01:09:40 +08:00
Improve code on f-strings and brevity (#6126)
* Update strassen_matrix_multiplication.py * Update matrix_operation.py * Update enigma_machine2.py * Update enigma_machine.py * Update enigma_machine2.py * Update rod_cutting.py * Update external_sort.py * Update sol1.py * Update hill_cipher.py * Update prime_numbers.py * Update integration_by_simpson_approx.py
This commit is contained in:
@ -114,7 +114,7 @@ def strassen(matrix1: list, matrix2: list) -> list:
|
||||
"""
|
||||
if matrix_dimensions(matrix1)[1] != matrix_dimensions(matrix2)[0]:
|
||||
raise Exception(
|
||||
f"Unable to multiply these matrices, please check the dimensions. \n"
|
||||
"Unable to multiply these matrices, please check the dimensions. \n"
|
||||
f"Matrix A:{matrix1} \nMatrix B:{matrix2}"
|
||||
)
|
||||
dimension1 = matrix_dimensions(matrix1)
|
||||
|
Reference in New Issue
Block a user