Archive for the ‘algorithms’ Category

h1

1. Hokey Pokey Algorithm

November 25, 2015

1a Mathspig Hokey pokey
Here’s the Hokey Pokey:

You put your right foot in
You take your right foot out
You put your right foot in
And you shake it all about
You do the hokey pokey
And you turn yourself around
That’s what it’s all about!

1b. Hokey Pokey

Why are algorithms as easy as the Hokey Pokey?

Because the Hokey Pokey is an algorithm or a set of steps that have to be taken to complete a task (see below) and the task is having fun and/or being really embarrassed by your parents in public. Whatever!

2. Algorithm 1
3. Algorithm 2
For more information about algorithms go to the Khan Academy here.

READABILITY ALGORITHM
We are going to look at texts including a maths test to check their readability. Here are just a few songs with their age and Grade readability scores:
Hokey Pokey (above) = Grade 3 = 9 yo
Frosty the Snowman = Grade 5 = 11 yo
Hello by Adele = Grade 5 = 11 yo
Wildest Dream = Taylor Swift = Grade 3 = 9 yo
Russians* Sting = Grade 6 = 12 yo
* Most complicated lyrics I know. Any other suggestions?

h1

2. Readability Algorithm

November 25, 2015

The above algorithms are called pseudocode because you do not type a letter to a computer to tell it what to do. You have to write code to instruct it.
But computer code, as my little sailor friend would say, uses a shipload of maths.
I am going to give you instructions by writing a letter to you because that is your CODE that you understand.
You are going to calculate the The Flesch–Kincaid reading score for The Hunger Games and a Harry Potter TEXT.
Don’t run screaming out the door. This is not too complicated.
The Flesch–Kincaid reading score or, quaintly, the F–K formula (Oops! Only one – )tells you the grade reading level of a text.
F-K formula
4. Flesch Kincaid Formula
We will use a basic version and a calculator:
5 F-K Formula Basic
You will need:
Word Count =
Sentence Count =
Syllable count =
The Flesch Reading Ease score is interpreted as follows:

6. Flesch Kinaid Readability Table

More info here.

READABILITY is important for Newspapers, books and websites

Text to be read by the general public should aim for a grade level of around 60 – 69 or Grade 8.
YA authors use the F-K formula to see if the text of their novel has the appropriate reading age.
YOU CAN TEST YOUR OWN WRITING! What reading age is your writing?

………………………………………………

 Are your FINANCIAL and LEGAL CONTRACTS READABLE?

You may be able to SUE your BANK!!!!!!!!!

Contracts, by law in the US, should be written to a reading score of Grade 8. According to a recent article in the Telegraph, UK:
Insurance and banking customers who have been mis-sold financial products are more likely to be awarded compensation if they use a scientific test to prove policy documents were too difficult to read.
The “Flesch Kincaid” reading score is well established in the US, where most states require insurers’ policy documents to be written at no higher than a ninth-grade level (14–15 years of age) of reading difficulty.

…………………………………………………………………

Hunger Games And Harry Potter TEXT Readability
Readability Calculations: Method 1
YOU ARE THE COMPUTER.
You will do All calculations.
Readability Calculations: Method 2
You are the algorithm. You will cut and paste text into programs that auto-count words and syllables, collect this and other data from your computer and do the calculations using a calculator or online Web 2 calculator.
Readability Calculations: Method 3:
Cut and paste text directly into a Readability Calculator to get score.

Here are some interesting Readability Scores:

6a Readaility Score USA Constyitution

h1

3.The Hunger Games Algorithm

November 25, 2015

The Hunger Games, Suzanne Collins TEXT

If Peeta and I were both to die, or they thought we were….My fingers fumble with the pouch on my belt, freeing it. Peeta sees it and his hand clamps on my wrist. “No, I won’t let you.” “Trust me,” I whisper. He holds my gaze for a long moment then lets go. I loosen the top of the pouch and pour a few spoonfuls of berries into his palm. Then I fill my own. “On the count of three?” Peeta leans down and kisses me once, very gently. “The count of three,” he says. We stand, our backs pressed together, our empty hands locked tight. “Hold them out. I want everyone to see,” he says. I spread out my fingers, and the dark berries glisten in the sun. I give Peeta’s hand one last squeeze as a signal, as a good-bye, and we begin counting. “One.” Maybe I’m wrong. “Two.” Maybe they don’t care if we both die. “Three!” It’s too late to change my mind. I lift my hand to my mouth taking one last look at the world. The berries have just passed my lips when the trumpets begin to blare. The frantic voice of Claudius Templesmith shouts above them. “Stop! Stop! Ladies and gentlemen, I am pleased to present the victors of the 74th Hunger Games, Katniss Everdeen and Peeta Mellark! I give you – the tributes of District 12!”

………………………………………………………

Readability Hunger Games: Method 1

The best way to count words and sentences is to cut and paste the text into a document and break the text up into sentences. This is a good exercise for students of all middle school students. You will find the text breakdown and syllable count here Hunger Games Readability

Word Count =

Sentence Count =

Syllable count =

Note: This last count will send you crazy. I kept getting different counts. Go with the middle count. ie. How many syllables in GIVE? G-ive. 2 syllables?

7. Hunger Games REadability Method 1

……………………………………………………………….

Readability Hunger Games: Method 2

Word Count =

Sentence Count =

Syllable count =

You will still have to do a sentence count, but you can cut and past the text into the following:

Word Counter

and

Syllable Counter

Results:

Word count = 234

Syllable count = 288

Sentence count = 26

8. Hunger Games Readability Method 2

……………………………………………………..

Readability Hunger Games: Method 3

Simply cut and paste the text into here or here.

9 Hunger Games readaility Method 3