Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[ bonus ( 1 0 points ) ] Statisticians used word frequency analysis to determine the author of the 1 2 unknown federalist papers ?

[bonus (10 points)] Statisticians used word frequency analysis to determine the author of the 12 unknown federalist papers ?3; basically, they counted how many times James Madison and Alexander Hamilton used individual words and noticed that Hamilton used "upon" way more than Madison. In this way, they were able to tell who wrote the 12 papers whose author was unknown.
Let's write a Python program to count how many times a given word appears in a sentence (it sure beats cutting out the individual words and then hand-sorting, which is how they did it before computers). You'll need to look up a string method for this, called "count", and maybe some other methods. (video demo)
4a)[2 points] What variables will we need to make? What variables will be inputs from the user? What variables will be outputs?
4b)[8 points] Write the code in a repl and paste the link here.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Modeling And Design

Authors: Toby J. Teorey, Sam S. Lightstone, Tom Nadeau, H.V. Jagadish

5th Edition

0123820200, 978-0123820204

More Books

Students also viewed these Databases questions