Answer to Vote Ratio This question is inspired by the fact that I love seeing questions with equal vote and answer counts...



So here's a simple stack-exchange-api challenge for y'all:

Challenge:

Given a codegolf.stackexchange question id, output the ratio between the question's votes and number of answers (e.g. votes/answers).

Specifics:


You may access the internet, but you may only access stackexchange.com and its various sub-domains. You may not use URL shorteners.
You may take input and give output in any standard format.
You must output the ratio as a decimal number in base 10, with at least 4 {accurate} digits after the decimal (zeros may be truncated).
If the question is unanswered, your program may produce undefined behavior.
You should use the score of the question as the vote-count, see here.


This is code-golf, least bytes in each language wins for that language, least bytes overall wins overall.

Here is a sample program in Python 3 + requests:

import requests
import json

id = input("id&gt; ")
url = "https://api.stackexchange.com/2.2/questions/" + id + "?site=codegolf"
content = requests.get(url).text
question = json.loads(content)["items"][0]

print(float(question["score"]) / question["answer_count"])
JavaScript (ES6), 103 102 bytes
Needs to be run from the root level of api.stackexchange.com. Returns a Promise object containing the result.
n=&gt;fetch(`questions/${n}?site=codegolf`).then(r=&gt;r.json()).then(({items:[j]})=&gt;j.score/j.answer_count)


1 byte saved thanks to kamoroso94.

If requiring that it be run from a specific path is allowed then that becomes 92 90 bytes.
n=&gt;fetch(n+`?site=codegolf`).then(r=&gt;r.json()).then(({items:[j]})=&gt;j.score/j.answer_count)


Try it
Full URL added to enable it to work here.


f=
n=&gt;fetch(`//api.stackexchange.com/questions/${n}?site=codegolf`).then(r=&gt;r.json()).then(({items:[j]})=&gt;j.score/j.answer_count)
onchange=_=&gt;f(+i.value).then(t=&gt;o.innerText=t)
&lt;input id=i type=number&gt;&lt;pre id=o&gt;