Skip to content

techarenz/CS.11.04-Quiz.4.1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CS.11.04-Quiz.4.1

Declare all methods as static.

  1. Write a method called numberOfVowels.

    Given a string, numberOfVowels will return the number of vowels in that string. Consider a, e, i, o, u as vowels.

  2. Write a method called notDivisibleBy235.

    Given a number N, notDivisibleBy235 will return the number of natural numbers not exceeding N that are not divisible by any of the numbers [2, 3, 5].

Example

Let's see what happens when N=5:

1 - not divisible by 2, 3, or 5
2 - divisible by 2
3 - divisible by 3
4 - divisible by 2
5 - divisible by 5

Answer: 1 (Of all the numbers not exceeding 5, only one isn't divisible by any of 2, 3, 5)

  1. Write a method called camelCaseMe.

    Given a string, this method converts dash/underscore delimited words into camel casing. The first word within the output should be capitalized only if the original word was capitalized (known as Upper Camel Case, also often referred to as Pascal case). The next words should always be capitalized.

Examples

"the-stealth-warrior" gets converted to "theStealthWarrior"

"The_Stealth_Warrior" gets converted to "TheStealthWarrior"

"The_Stealth-Warrior" gets converted to "TheStealthWarrior"

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages