Hinzor
Junior Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору def is_divisible(x, y): if x>0 and y>0: print("x and y are positive \n function is_powers starts") else: print('x or Y is negative or = 0 \nfunction is_power will be stopped') def is_power(x, y): if y == 1: print("y=1 , function is_power will be stopped") elif x == y: print("x=y , function is_power will be stopped") else: print(x / y) is_power(x - y, y) print("is_power(27, 3) returns: ", is_power(27, 3)) Это одна фунцкия дожна была вызывать другую, проверять на позитивность агрументы, а вторая искать деление на корень (логарифм?). Я знаю это далеко от идеала. |