I was messing around with Pyth's url request feature, and noticed that google always gave a response with a slightly different length for me, usually
So your task in this challenge is to print out the average length of the html response from
- You will take an input
nwhich is the number of requests to make.
- For each request, you will make an HTTP get request.
- You will count the response body (the html text), not the headers.
- Output the arithmetic mean of the lengths of the responses.
- You can only access the url
http://google.com, not any other.
- This is code-golf, so shortest code in bytes wins!
Sample output for input
(I used Python's
urllib for that)
P.S: does anyone know why google does this?