a*b, если b>0, иначе 2+a+b написать код, Python
Ответ
1
a = int(input("Введите a: "))
b = int(input("Введите b: "))
if b>0:
rezultat = a*b
else:
rezultat = 2+a+b
print(rezultat)
Ответ
1
a = float(input("a="))
b = float(input("b="))
if b > 0:
print(a*b)
else:
print(2+a+b)