« Back to the Parças Forum

terceiro codigo (10/03/25)

Posted by die

posted

Forum: Parças Group

def calcular_porcentagens(valor):

    porcentagem_5 = valor * 0.05

    porcentagem_50 = valor * 0.50

    return porcentagem_5, porcentagem_50


valor = float(input("Digite um valor: R$ "))


porcentagem_5, porcentagem_50 = calcular_porcentagens(valor)


print(f"5% de R${valor} é R${porcentagem_5:.2f}")

print(f"50% de R${valor} é R${porcentagem_50:.2f}")


Report Topic

1 Reply

Reply by DRAGÃO

posted

ta certo isso die???

safda


Permalink Report Reply