-2
@Edit Good evening, I’m having a problem in this code below
It performs two multiplication operations
a * h = X
b * C = Y
so far so good, but for example, the value of X is less than the value of Y, the wrong account, so I was wondering if it is possible to prioritize the higher number that is the Y to be divided by the lower
valor_de_a = input("Insira o valor de A: ")
valor_de_h = input("Insira o valor de H: ")
valor_de_b = input("Insira o valor de B: ")
valor_de_c = input("Insira o valor de C: ")
tempA = float(valor_de_a)
tempH = float(valor_de_h)
tempB = float(valor_de_b)
tempC = float(valor_de_c)
A_H = tempA * tempH
B_C = tempB * tempC
resultadoA = (A_H / B_C)
print("O resultado de a x h é", A_H)
print("O resultado de b x c é", B_C)
print("O resultado final é", resultadoA)
Cleiton, welcome back, edit your question and put your codes. I recommend you to do the tour
– Luiz Augusto
I think the min() and max() functions will suit your case
– epx