Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 1.29 KB

README.md

File metadata and controls

24 lines (16 loc) · 1.29 KB

unique_english_letters_Py_3

unique_english_letters takes a string word as a parameter. The function should return the total number of unique letters in the string. Uppercase and lowercase letters should be counted as different letters. The list of every uppercase and lower case letter in the English alphabet is in a string "letters".

General info

The purpose of the project is just personal learning. I may revisit this code to find different solutions or to apply it under other context.

Description

The function iterates through word, and compares if the letter is already in the list unique (that starts as an empty list). If it hasn't been added to unique before, it appends it. The function returns the length of unique.

TO-DOs

  • The problem said: "Loop through the list of English letters and check to see if each letter is included in word." I did it differently and didn't get to use the list letters, and it worked and it seems a better solution, but maybe I should try to do it as intended - just for fun.

Technologies

  • Python 3

Setup

NA - It's only coding examples, there's no setup.

Status

Project is: finished, - may come back and improve it, or not.

References

Based on Codecademy's Learn Python 3 course, Code Challenges: String Methods exercises