Skip to content

Tarqwyn/code_challenge_wk3

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

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 fine 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 100.0%