Coder Social home page Coder Social logo

code_challenge_wk3's Introduction

code_challenge_wk3

Character frequency find the frequency of each character in a paragraph only for alphabetical characters and ignore casing

given a paragraph iterate through the characters and find the percentage of each charcher "how many times it has been used compared to all other characters in the whole paragraph" print the frequency of each char in the console or represent them in a bar chart, a pie chart, a graph or however you like

no restrictions on language used


example: paragraph = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce est nunc, suscipit eget dignissim sed, iaculis sed dolor. Curabitur et rhoncus est. Aenean eget turpis aliquam, ullamcorper magna ut, mollis mi. Aliquam accumsan massa ac lobortis ultrices. Vestibulum nec ipsum sem. Duis convallis at mi a suscipit. Sed eleifend, mi non tempus aliquam, nibh risus vestibulum arcu, quis tempor arcu nisl in dui. Ut sapien purus, congue non tincidunt vel, imperdiet eget risus. Fusce ut malesuada eros. Nullam accumsan, leo ac pharetra hendrerit, mauris est ornare tortor, scelerisque accumsan massa nulla id nulla. Aenean auctor mi id ultricies convallis. Fusce varius vel arcu vitae aliquam."

characterFrequency:

a: 7.569141193595342 b: 0.727802037845706 c: 4.8034934497816595 d: 2.328966521106259 e: 7.860262008733624 f: 0.5822416302765647 g: 1.0189228529839884 h: 0.5822416302765647 i: 8.151382823871907 j: 0 k: 0 l: 5.094614264919942 m: 4.366812227074236 n: 4.9490538573508 o: 3.3478893740902476 p: 1.8922852983988354 q: 0.8733624454148472 r: 4.9490538573508 s: 8.005822416302765 t: 5.240174672489083 u: 7.569141193595342 v: 1.1644832605531295 w: 0 x: 0 y: 0 z: 0

Characters: %81.07714701601162 Not used: %18.922852983988353

code_challenge_wk3's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.