Rather proud of this

It’s 30 years Oct 21.

In honor of that I made an assignment for my class:

You find an odd DeLorean parked around the corner. Realizing that Doc Brown has left the keys in the ignition, you decide that a quick trip back to England in 1815 for the purpose of buying the film rights to Pride and Prejudice, Persuasion, and Emma would be remunerative.

As usual, the car fails and you are stranded.

All is not lost, Miss Austen (or her brother Henry, a dashing naval captain) are good company and you decide to settle in for the long haul. She needs a business manager, and having few other practical skills, you volunteer. This means understanding English currency.

Fortunately, you have your laptop, with a python interpreter, and by the use of lemon juice, copper pennies and zinc you are able to rig up a battery to keep it running.

English money is denominated in pounds shillings and pence (L/s/d). There are 12 pence to the shilling and 20 shillings to the pound. Half-pence (hapennies) and quarter-pence (farthings) are used so you must handle sums like 10/4/5 3/4

  1. Write a python program that takes a list of money and sums them correctly.

1/2/3

2/18/9 should sum to 4/1/0

Leading 0’s are usually left off, so 2/6 is 2 shillings and 6 pence.

  1. Make it do subtraction.

2/18/9

– 1/2/3 1/2 should be 1/16/5 1/2

\

Author: rharrisonauthor

International man of mystery. Well not really, although I can mangle several languages and even read the occasional hieroglyphic. A computer scientist, an author and one of the very few people who has both an NIH grant and had a book contract. An ex- booktrope author and a photographer.

Kevin Drum

Politics, charts, and cats from the newly blue enclave of Orange County, California

Moosmosis

Global Health and Education

She Reads Reviews

Historical Fiction, YA, Fantasy, Contemporary, Literary, and Non-fiction Book Reviews

Journey2Motivate

Inspirational Quotes To Motivate Your Life

Makabiyahe

To Travel, To Explore

Bedrock & Paradox

I dream of a hard and brutal mysticism in which the naked self merges with a non-human world and yet somehow survives still intact, individual, separate. Paradox and bedrock.

Opulence

Freelancing, Art, and Side Hustles

Blog about Mexico's Must Have Seen

Playa del Carmen, Tulum, Cancun, Riviera Maya, Cenotes, Sian Ka'an, Cozumel, Bacalar, Mahahual, Monterrey...

Disturbed Literature

Writings of Jambo Stewart

J. A. Allen

Scribbles on Cocktail Napkins

O at the Edges

Musings on poetry, language, perception, numbers, food, and anything else that slips through the cracks.

Laugh With Me

This WordPress.com site is the bee's knees

%d bloggers like this: