Skip to content

Coding Challenge to sort a list of names from a list in names.txt and make some calculations on the list.

Notifications You must be signed in to change notification settings

Ashley-Gibson/Names

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Names

Coding Challenge to sort a list of names from a list in names.txt and make some calculations on the list.

Coding Challenge

  1. Using names.txt a file containing over five-thousand first names, begin by sorting it into alphabetical order and store as sorted_names.txt

  2. For each name in the sorted file Work out the alphabetical value and multiply by its position in the list to obtain a total name score.

Example Alphebetical Values are giving each letter a number based on position in the alphabet: A=1, B=2, C=3 etc The alphabetical value of COLIN is 3 + 15 + 12 + 9 + 14 = 53

The position is the numbered position of this name in the sorted list. Multiplying the name score with the position of COLIN in the sorted list (938) gets a total name score of 938 × 53 = 49714

Output: What is the grand total of all the total name scores in the file?

Optional Extras:

  • What is the highest total scoring name and what position is it in?
  • What is the lowest total scoring name and what position is it in?
  • What is the highest alphabetical value for a name?
  • What is the lowest alphabetical value for a name?
  • What is the average alphebetical value for the names?

Technologies

The technologies used in this project are as follows.

  • C# .NET Core Web Application

Project Management

Names - Azure DevOps

About

Coding Challenge to sort a list of names from a list in names.txt and make some calculations on the list.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published