{
  "address": "86950c0de7f0e2d7475eaad57723775a",
  "category": "other",
  "question": "A bill of $84.5 gets a 18% tip and is split evenly among 4 people. What is the tip, the total, and each person's share?",
  "answer": "Tip $15.21, total $99.71, $24.93 per person",
  "askedBy": {
    "kind": "guest",
    "display": "method deck",
    "stamped": false,
    "id": null
  },
  "answeredBy": "method",
  "madeAt": "2026-09-30T22:39:30.722Z",
  "validUntil": null,
  "validityClass": "forever",
  "sources": [
    {
      "label": "Your Money, Your Goals: percentage and tip calculation conventions",
      "url": "https://www.consumerfinance.gov/consumer-tools/educator-tools/your-money-your-goals/toolkit/"
    }
  ],
  "supersedes": null,
  "supersededBy": null,
  "isSeed": false,
  "seedSource": null,
  "seedAttribution": null,
  "duplicateOfQid": null,
  "publishedAt": null,
  "unpublishedAt": null,
  "voteCount": 0,
  "queuedForSubstrate": false,
  "answerMethod": "method",
  "unsourced": false,
  "source": {
    "kind": "url",
    "value": "https://www.consumerfinance.gov/consumer-tools/educator-tools/your-money-your-goals/toolkit/",
    "retrieved_utc": "2026-09-30T19:31:29Z"
  },
  "qsha256": "7afff8dc8df4c09887791fefd8b804e0ea8db93da87ff292260e630b03a4b199",
  "runOne": null,
  "cardContractVersion": "card_contract/1",
  "deck_id": "method-deck",
  "deck_title": "Method Deck",
  "method": {
    "name": "Tip and split a bill",
    "version": "1",
    "source_url_or_file": "methods/tip-and-split-bill.cjs",
    "sha256_of_method_file": "99269013230ed5b5e5e7ee55c64e529cc29b04fccbb4bd1d6e43135544811a1e"
  },
  "receipt": {
    "inSubstrate": false,
    "local": true,
    "modelCallsAtMint": 0,
    "tokensAtMint": 0
  },
  "method_deck": {
    "inputs": [
      {
        "name": "bill_amount",
        "type": "number",
        "unit": "currency units",
        "required": true,
        "description": "Pre-tip bill amount",
        "min": 0
      },
      {
        "name": "tip_percent",
        "type": "number",
        "unit": "%",
        "required": true,
        "description": "Tip percentage",
        "min": 0
      },
      {
        "name": "number_of_people",
        "type": "integer",
        "required": true,
        "description": "Number of people splitting the bill evenly",
        "min": 1
      }
    ],
    "outputs": [
      {
        "name": "tip_amount",
        "unit": "currency units",
        "description": "Total tip amount"
      },
      {
        "name": "total_amount",
        "unit": "currency units",
        "description": "Bill plus tip"
      },
      {
        "name": "amount_per_person",
        "unit": "currency units",
        "description": "Even share of the total per person"
      }
    ],
    "steps": [
      "Convert the tip percent to a decimal: t = tip_percent / 100.",
      "tip_amount = bill_amount * t.",
      "total_amount = bill_amount + tip_amount.",
      "amount_per_person = total_amount / number_of_people.",
      "Round tip_amount, total_amount, and amount_per_person to 2 decimals (money to cents)."
    ],
    "constants": [],
    "examples": [
      {
        "name": "worked example",
        "inputs": {
          "bill_amount": 84.5,
          "tip_percent": 18,
          "number_of_people": 4
        },
        "expected": {
          "answer": "Tip $15.21, total $99.71, $24.93 per person"
        },
        "check": "hand computation: tip = 84.50*0.18 = 15.21; total = 84.50+15.21 = 99.71; per person = 99.71/4 = 24.9275, rounds to 24.93"
      },
      {
        "name": "test vector: single diner, no tip",
        "inputs": {
          "bill_amount": 20,
          "tip_percent": 0,
          "number_of_people": 1
        },
        "expected": {
          "answer": "Tip $0.00, total $20.00, $20.00 per person"
        },
        "check": "hand computation: tip = 0.00; total = 20.00; per person = 20.00"
      }
    ],
    "disclaimer": null,
    "deck_category": "finance"
  },
  "status": "minted",
  "kind": "method",
  "provenanceClass": "own_question",
  "provenance": {
    "schema": "card_provenance/2.0.0",
    "chain": [
      {
        "source": {
          "kind": "url",
          "value": "https://www.consumerfinance.gov/consumer-tools/educator-tools/your-money-your-goals/toolkit/",
          "retrieved_utc": "2026-09-30T19:31:29Z"
        },
        "sha256": "19b7e156694dbf0b8c404d99b140bb1a6ec274d3c13550f83fc33f5f68ceaba5",
        "supersedes": null,
        "added_utc": "2026-09-30T22:39:30.722Z",
        "added_by": "method:Tip and split a bill",
        "why": "the method that computed this answer",
        "check": null,
        "status_label": "pending",
        "signature": null
      }
    ]
  }
}
