blob: 4d99aac50e6ace684615ecd05e0823bba43bfc8a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
Challenge 1: "Write a script to calculate the value of e, also known
as Euler's number and Napier's constant."
My notes: The associated wiki page reminds us that the easiest way of
calculating e (the base of natural logarithms) is via:
e = 2 + 1/2! + 1/3! + 1/4! + ... 1/n! Let's use that.
Challenge 2: "Write a script for URL normalization based on rfc3986. This
task was shared by Anonymous Contributor.
According to Wikipedia, URL normalization is the process by which URLs
are modified and standardized in a consistent manner. The goal of the
normalization process is to transform a URL into a normalized URL so
it is possible to determine if two syntactically different URLs may
be equivalent.
My notes: The RFC link points to a long list of regex-syle changes,
not all of which have to be implemented. Easy to implement most.
|