Generation

generate functionSun, 16 Jul 2023

3. El 14 de febrero una persona desea comprarle un regalo al ser querido que más aprecia en ese momento, su dilema radica en qué regalo puede hacerle, las alternativas que tiene son las siguientes: Regalo Costo Tarjeta Lps. 10.00 o menos Chocolates Lps. 11.00 a Lps. 100.00 Flores Lps. 101.00 a Lps. 250.00 Anillo Más de Lps. 251.00

def valentine(gift): if gift > 251.00: print("You should buy an Anillo") elif gift >= 101.00 and gift <= 250.00: print("You should buy some Flores") elif gift >= 11.00 and gift <= 100.00: print("You should buy some Chocolates") elif gift <= 10.00: print("You should buy a Tarjeta") else: print("You should buy a Tarjeta") valentine(100.00)

Questions about programming?Chat with your personal AI assistant