79644691

Date: 2025-05-29 22:33:33
Score: 0.5
Natty:
Report link
    var inventory = {
        "Apple":    {"Cost": 0.99, "Stock": 3},
        "Orange":   {"Cost": 1.49, "Stock": 11},
        "Grapes":   {"Cost": 3.99, "Stock": 2},
        }
    
    for item in inventory.keys():
        var data  = inventory[item]
        var stock = data["Stock"]
        var cost  = data["Cost"]
        var name  = item
        if !item.ends_with("s"):
            name += "s"
            
        print("There are %d %s, and they cost %.2f each." % [ stock, name, cost ])
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: TechnoM4ncer