Categories
Array Coderbyte Data Structures and Algorithms Python String manipulation

[Coderbyte] – H Distance [Easy]

The coding challenge for today is called “H Distance”. In short, this challenge asks us to find the number of characters that are not found in both strings. However, Coderbyte does a better job of explaining the problem: Have the function HDistance(strArr) take the array of strings stored in strArr, which will only contain two strings of equal […]

Categories
Array Coderbyte Data Structures and Algorithms Maths Python

[Coderbyte] – Mean Mode [Easy]

Let’s get back to Coderbyte again. This time we have the “Mean Mode” challenge. The challenge requirements are as follows: Have the function MeanMode(arr) take the array of numbers stored in arr and return 1 if the mode equals the mean, 0 if they don’t equal each other (ie. [5, 3, 3, 3, 1] should return 1 because the mode (3) equals the mean (3)). The array will not […]

Categories
Exercism String manipulation

[Exercism] – Pangram

I have found another coding website where you can solve challenges in 48 languages. Besides that, there are mentors that check your solutions and provide you feedback. You can check more about Exercism here. I will use Exercism alongside Coderbyte. The problem description below is taken from Exercism: Determine if a sentence is a pangram. A […]

Categories
Coderbyte Data Structures and Algorithms Easy Python String manipulation

[Coderbyte] – Letter Changes [Easy]

For today’s article, we have the ‘Letter Changes’ problem. The full description from Coderbyte is below: Have the function LetterChanges(str) take the str parameter being passed and modify it using the following algorithm. Replace every letter in the string with the letter following it in the alphabet (ie. c becomes d, z becomes a). Then capitalize every vowel in this […]

Categories
Coderbyte Data Structures and Algorithms Easy Maths Python String manipulation Uncategorized

[Coderbyte] – Dash Insert [Easy]

This problem asks us to add a dash between each pair of odd numbers in the given string. A more detailed description from Coderbyte: Have the function DashInsert(str) insert dashes (‘-‘) between each two odd numbers in str. For example: if str is 454793 the output should be 4547-9-3. Don’t count zero as an odd number.  The first step is to create a […]

Categories
Coderbyte Data Structures and Algorithms Easy Python

[Coderbyte] – Letter Count I [Easy]

This version of letter count is a challenge I have enjoyed solving because I have found a solution shorter and easier to understand than most of the top answers from Coderbyte.  The challenge requirements can be seen below: Have the function LetterCountI(str) take the str parameter being passed and return the first word with the greatest number of repeated […]

Categories
Coderbyte Data Structures and Algorithms Maths Python

[Coderbyte] – Powers of Two [Easy]

The challenge description, as it is on Coderbyte: Have the function PowersofTwo(num) take the num parameter being passed which will be an integer and return the string true if it’s a power of two. If it’s not return the string false. For example if the input is 16 then your program should return the string true but if the input is 22 […]

Categories
Array Coderbyte Data Structures and Algorithms Python

[Coderbyte] – Second GreatLow [Easy]

The challenge I have solved recently is called “Second GreatLow”.  The full challenge description, taken from the Coderbyte website, is below: Have the function SecondGreatLow(arr) take the array of numbers stored in arr and return the second lowest and second greatest numbers, respectively, separated by a space. For example: if arr contains [7, 7, 12, 98, 106] the output should be 12 […]

Categories
Uncategorized

[Coderbyte] – Vowel Count [Easy]

The “Vowel Count” is a popular and a self-explanatory challenge. Regardless, below is the challenge description taken from the Coderbyte website: Have the function VowelCount(str) take the str string parameter being passed and return the number of vowels the string contains (ie. “All cows eat grass and moo” would return 8). Do not count y as a vowel for this challenge.  Use […]

Categories
Coderbyte Data Structures and Algorithms Python String manipulation

[Coderbyte] – Time Convert [Easy]

The Time Convert challenge is the challenge I am going to explain in this article. The description below is taken straight from the Coderbyte website: Have the function TimeConvert(num) take the num parameter being passed and return the number of hours and minutes the parameter converts to (ie. if num = 63 then the output should be 1:3). Separate the number of hours and minutes with […]