Until decimalization in 1971, British money was based on dividing the pound into 240 pennies. A shilling was 12 pennies so 20 shillings made a pound. The smallest denomination was the farthing at one fourth of a penny. There were many other denominations and nicknames for coins, which can get quite confusing if you're not used to the system.
Write a program or function that can convert (almost) any denomination of old English money to any other. To make it easier for the user you need to support plurals and nicknames.
These are the denominations and their synonymous terms you must support. For convenience their value in farthings leads each line.
1: farthing, farthings 2: halfpence, halfpenny, halfpennies 4: penny, pennies, pence, copper, coppers 8: twopenny, twopennies, twopence, tuppence, half groat, half groats 12: threepence, threepenny, threepennies, threepenny bit, threepenny bits, thruppence, thrupenny, thrupennies, thrupenny bit, thrupenny bits 16: groat, groats 24: sixpence, sixpenny, sixpennies, sixpenny bit, sixpenny bits, tanner, tanners 48: shilling, shillings, bob 96: florin, florins, two bob bit, two bob bits 120: half crown, half crowns 240: crown, crowns 480: half sovereign, half sovereigns 504: half guinea, half guineas 960: pound, pounds, pounds sterling, sovereign, sovereigns, quid, quids 1008: guinea, guineas
(I am not British, this list is by no means authoritative but it will suffice for the challenge.)
Via stdin or function argument you should take in a string of the form
[value to convert] [denomination 1] in [denomination 2]
and return or print
[value to convert] [denomination 1] is [converted value] [denomination 2]
[converted value] is
[value to convert] units of denomination 1 converted to denomination 2.
[value to convert] and
[converted value] are positive floats. In the output both should be rounded or truncated to 4 decimal places. If desired you may assume
[value to convert] always has a decimal point and zero when input (e.g.
1.0 instead of
Denominations 1 and 2 may be any two terms from the list above. Don't worry about whether they're plural or not, treat all denominations and synonyms the same. You may assume the input format and denominations are always valid.
1 pounds in shilling →
1 pounds is 20 shilling
1.0000 pounds is 20.0000 shilling would be fine)
0.6 tuppence in tanner →
0.6 tuppence is 0.2 tanner
24 two bob bits in pounds sterling →
24 two bob bits is 2.4 pounds sterling
144 threepennies in guineas →
144 threepennies is 1.7143 guineas
The shortest code in bytes wins.