{"slug":"mean","tier":1,"subject":"statistics","title":"Mean","description":"Arithmetic mean of n values.","files":[{"filename":"MEAN.py","content":"def p(s):print(s)\ndef f():\n n=int(input(\"n:\"))\n s=0.0\n for i in range(n):\n  s+=float(input(\">\"))\n p(\"m=\"+str(s/n))\nf()"}],"testCases":[{"id":"three-nums","inputs":["3","2","4","6"],"expectedContains":["m=4.0"]}],"usage":"Launch `MEAN` from `prgm`. The program runs once (no menu).\n\n1. `n:` — enter how many numbers you're averaging.\n2. `>` — type the first value, `enter`.\n3. Keep pressing `>` for each subsequent value.\n\nAfter the last value, output is `m=` with the arithmetic mean. Program exits automatically.","example":{"problem":"Your last three quiz scores were 80, 90, and 100. What's your average?","walkthrough":"1. Run `MEAN`.\n2. `n:` → **3**.\n3. `>` → **80**, `enter`.\n4. `>` → **90**, `enter`.\n5. `>` → **100**, `enter`.\n6. Output: `m=90.0`.\n\nAverage is 90. Verify: (80+90+100)/3 = 270/3 = 90. ✓"}}