Измените код , чтобы простые множители выводились не в строчку, а в один столбец def func1 (x , d =2):
while x > 1:
g , r = divmod (x , d)
if r:
d += 1
else:
yield d
x = g
n = int(input(" Уведіть ціле число: "))
print ('{ } = { }' .format (n, ' * ' .join(map(str, func1 (n)))))
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Copyright © 2024 SCHOLAR.TIPS - All rights reserved.