Browse Source

first commit

wes 4 years ago
commit
d2a2ba9e15
100 changed files with 2098 additions and 0 deletions
  1. 29 0
      24Hour-Time/README.md
  2. 28 0
      24Hour-Time/code.cpp
  3. 10 0
      24Hour-Time/unitTest.cpp
  4. 29 0
      Add-Subtract-Multiply-or-Divide/README.md
  5. 20 0
      Add-Subtract-Multiply-or-Divide/code.cpp
  6. 8 0
      Add-Subtract-Multiply-or-Divide/unitTest.cpp
  7. 32 0
      All-Rotations-of-a-String/README.md
  8. 34 0
      All-Rotations-of-a-String/code.cpp
  9. 70 0
      All-Rotations-of-a-String/unitTest.cpp
  10. 27 0
      Are-the-Numbers-Equal/README.md
  11. 3 0
      Are-the-Numbers-Equal/code.cpp
  12. 8 0
      Are-the-Numbers-Equal/unitTest.cpp
  13. 33 0
      Area-of-a-Triangle/README.md
  14. 3 0
      Area-of-a-Triangle/code.cpp
  15. 8 0
      Area-of-a-Triangle/unitTest.cpp
  16. 29 0
      Atbash-Cipher/README.md
  17. 22 0
      Atbash-Cipher/code.cpp
  18. 7 0
      Atbash-Cipher/unitTest.cpp
  19. 27 0
      Basic-Calculator/README.md
  20. 13 0
      Basic-Calculator/code.cpp
  21. 10 0
      Basic-Calculator/unitTest.cpp
  22. 34 0
      Bit-Rotation/README.md
  23. 30 0
      Bit-Rotation/code.cpp
  24. 12 0
      Bit-Rotation/unitTest.cpp
  25. 34 0
      Body-Mass-Index/README.md
  26. 47 0
      Body-Mass-Index/code.cpp
  27. 8 0
      Body-Mass-Index/unitTest.cpp
  28. 26 0
      Capitalize-the-Names/README.md
  29. 23 0
      Capitalize-the-Names/code.cpp
  30. 10 0
      Capitalize-the-Names/unitTest.cpp
  31. 34 0
      ChartoASCII/README.md
  32. 6 0
      ChartoASCII/code.cpp
  33. 62 0
      ChartoASCII/unitTest.cpp
  34. 29 0
      Check-If-the-Brick-Fits-through-the-Hole/README.md
  35. 18 0
      Check-If-the-Brick-Fits-through-the-Hole/code.cpp
  36. 9 0
      Check-If-the-Brick-Fits-through-the-Hole/unitTest.cpp
  37. 40 0
      Check-String-for-Spaces/README.md
  38. 9 0
      Check-String-for-Spaces/code.cpp
  39. 10 0
      Check-String-for-Spaces/unitTest.cpp
  40. 27 0
      Check-if-a-Number-is-a-Palindrome/README.md
  41. 15 0
      Check-if-a-Number-is-a-Palindrome/code.cpp
  42. 9 0
      Check-if-a-Number-is-a-Palindrome/unitTest.cpp
  43. 34 0
      Check-if-an-Array-Contains-a-Given-Number/README.md
  44. 9 0
      Check-if-an-Array-Contains-a-Given-Number/code.cpp
  45. 9 0
      Check-if-an-Array-Contains-a-Given-Number/unitTest.cpp
  46. 31 0
      Check-if-an-Integer-is-Divisible-By-Five/README.md
  47. 4 0
      Check-if-an-Integer-is-Divisible-By-Five/code.cpp
  48. 10 0
      Check-if-an-Integer-is-Divisible-By-Five/unitTest.cpp
  49. 31 0
      Chess-Pieces/README.md
  50. 62 0
      Chess-Pieces/code.cpp
  51. 16 0
      Chess-Pieces/unitTest.cpp
  52. 52 0
      Christmas-Tree/README.md
  53. 45 0
      Christmas-Tree/code.cpp
  54. 23 0
      Christmas-Tree/unitTest.cpp
  55. 30 0
      Compare-Strings-by-Count-of-Characters/README.md
  56. 3 0
      Compare-Strings-by-Count-of-Characters/code.cpp
  57. 10 0
      Compare-Strings-by-Count-of-Characters/unitTest.cpp
  58. 31 0
      Concatenate-First-and-Last-Name-into-One-String/README.md
  59. 3 0
      Concatenate-First-and-Last-Name-into-One-String/code.cpp
  60. 7 0
      Concatenate-First-and-Last-Name-into-One-String/unitTest.cpp
  61. 31 0
      Convert-Hours-and-Minutes-into-Seconds/README.md
  62. 8 0
      Convert-Hours-and-Minutes-into-Seconds/code.cpp
  63. 6 0
      Convert-Hours-and-Minutes-into-Seconds/unitTest.cpp
  64. 29 0
      Convert-Hours-into-Seconds/README.md
  65. 3 0
      Convert-Hours-into-Seconds/code.cpp
  66. 7 0
      Convert-Hours-into-Seconds/unitTest.cpp
  67. 31 0
      Convert-Minutes-into-Seconds/README.md
  68. 3 0
      Convert-Minutes-into-Seconds/code.cpp
  69. 7 0
      Convert-Minutes-into-Seconds/unitTest.cpp
  70. 51 0
      Convert-Number-to-Corresponding-Month-Name/README.md
  71. 22 0
      Convert-Number-to-Corresponding-Month-Name/code.cpp
  72. 15 0
      Convert-Number-to-Corresponding-Month-Name/unitTest.cpp
  73. 33 0
      Convert-Number-to-String-of-Dashes/README.md
  74. 11 0
      Convert-Number-to-String-of-Dashes/code.cpp
  75. 9 0
      Convert-Number-to-String-of-Dashes/unitTest.cpp
  76. 29 0
      Correct-the-Mistakes/README.md
  77. 9 0
      Correct-the-Mistakes/code.cpp
  78. 10 0
      Correct-the-Mistakes/unitTest.cpp
  79. 42 0
      Count-Letters-in-a-Word-Search/README.md
  80. 13 0
      Count-Letters-in-a-Word-Search/code.cpp
  81. 62 0
      Count-Letters-in-a-Word-Search/unitTest.cpp
  82. 30 0
      Double-Letters/README.md
  83. 12 0
      Double-Letters/code.cpp
  84. 15 0
      Double-Letters/unitTest.cpp
  85. 28 0
      Edaaaaabit/README.md
  86. 8 0
      Edaaaaabit/code.cpp
  87. 8 0
      Edaaaaabit/unitTest.cpp
  88. 29 0
      Factorize-a-Number/README.md
  89. 13 0
      Factorize-a-Number/code.cpp
  90. 8 0
      Factorize-a-Number/unitTest.cpp
  91. 29 0
      First-N-Vowels/README.md
  92. 20 0
      First-N-Vowels/code.cpp
  93. 9 0
      First-N-Vowels/unitTest.cpp
  94. 28 0
      Flip-the-Boolean/README.md
  95. 8 0
      Flip-the-Boolean/code.cpp
  96. 5 0
      Flip-the-Boolean/unitTest.cpp
  97. 26 0
      Flip-the-int-Boolean/README.md
  98. 8 0
      Flip-the-int-Boolean/code.cpp
  99. 4 0
      Flip-the-int-Boolean/unitTest.cpp
  100. 27 0
      Generate-a-Countdown-of-Numbers-in-an-Array/README.md

+ 29 - 0
24Hour-Time/README.md

@@ -0,0 +1,29 @@
+# 24-Hour Time
+by Matt
+tags: strings, numbers, dates
+
+## Summary
+> Write a function that receives the time in 12-hour AM/PM format and returns a string representation of the time in military (24-hour) format.
+> Examples
+> convertTime(“07:05:45PM”) ➞ “19:05:45”
+> convertTime(“12:40:22AM”) ➞ “00:40:22”
+> convertTime(“12:45:54PM”) ➞ “12:45:54”
+> Notes
+> Midnight is 12:00:00AM on a 12-hour clock, and 00:00:00 on a 24-hour clock.
+> Noon is
+
+## Instructions
+Write a function that receives the time in 12-hour AM/PM format and returns a string representation of the time in military (24-hour) format.
+
+### Examples
+```
+convertTime(“07:05:45PM”) ➞ “19:05:45”
+
+convertTime(“12:40:22AM”) ➞ “00:40:22”
+
+convertTime(“12:45:54PM”) ➞ “12:45:54”
+
+```
+### Notes
+- Midnight is 12:00:00AM on a 12-hour clock, and 00:00:00 on a 24-hour clock.
+- Noon is 12:00:00PM on a 12-hour clock, and 12:00:00 on a 24-hour clock.

+ 28 - 0
24Hour-Time/code.cpp

@@ -0,0 +1,28 @@
+/*  Write a function that receives the time in 12-hour AM/PM format 
+ *  and returns a string representation of the time in military (24-hour) 
+ *  format.
+ *  Midnight is 12:00:00AM on a 12-hour clock, and 00:00:00 on a 24-hour clock.
+ *  Noon is 12:00:00PM on a 12-hour clock, and 12:00:00 on a 24-hour clock.
+ */
+std::string convertTime(std::string str) {
+	//  create substr of first 2 characters in string
+	int cCheck = std::stoi (str.substr(0,2));
+	//  if cCheck is 12, set it equal to 0. Now AM or PM will show correctly. URHMHUMPH!!!
+	if (12 == cCheck){
+		cCheck = 0;
+	}	
+	//  use the substr for conditional if/else to see if 12 needs to be added
+	//  use AM/PM to see if it needs to be modified.
+	if(str.substr(8,2)== "PM"){
+		cCheck += 12;
+	}
+	//  if cCheck is one digit, add a leading zero
+	if(cCheck<10){
+  	str.replace(0,2,"0" + std::to_string(cCheck));
+	}
+	//  otherwise cCheck is a two digit replacement
+	else 	{
+		str.replace(0,2,std::to_string(cCheck));
+		}
+return str.substr(0,8);
+}

+ 10 - 0
24Hour-Time/unitTest.cpp

@@ -0,0 +1,10 @@
+Describe(tests)
+{
+  It(test1){Assert::That(convertTime("07:05:45PM"), Equals("19:05:45"));}
+	It(test2){Assert::That(convertTime("12:40:22AM"), Equals("00:40:22"));}
+	It(test3){Assert::That(convertTime("12:45:54PM"), Equals("12:45:54"));}
+	It(test4){Assert::That(convertTime("05:32:33PM"), Equals("17:32:33"));}
+	It(test5){Assert::That(convertTime("11:59:59PM"), Equals("23:59:59"));}
+	It(test6){Assert::That(convertTime("11:59:59AM"), Equals("11:59:59"));}
+	It(test7){Assert::That(convertTime("06:00:19AM"), Equals("06:00:19"));}
+};

+ 29 - 0
Add-Subtract-Multiply-or-Divide/README.md

@@ -0,0 +1,29 @@
+# Add, Subtract, Multiply or Divide?
+by Matt
+tags: math, numbers
+
+## Summary
+> Write a function that takes two numbers and returns if they should be added, subtracted, multiplied or divided to get 24. If none of the operations can give 24, return "Invalid".
+> Examples
+> operation(15, 9) ➞ "added"
+> operation(26, 2) ➞ "subtracted"
+> operation(11, 11) ➞ "Invalid"
+> Notes
+> Only integers are used as test input.
+> Numbers should be added, subtracted, 
+
+## Instructions
+Write a function that takes two numbers and returns if they should be added, subtracted, multiplied or divided to get 24. If none of the operations can give 24, return `"Invalid"`.
+
+### Examples
+```
+operation(15, 9) ➞ "added"
+
+operation(26, 2) ➞ "subtracted"
+
+operation(11, 11) ➞ "Invalid"
+```
+
+### Notes
+- Only integers are used as test input.
+- Numbers should be added, subtracted, divided or multiplied in the order they appear in the parameters.

+ 20 - 0
Add-Subtract-Multiply-or-Divide/code.cpp

@@ -0,0 +1,20 @@
+/*  Write a function that takes two numbers and returns if they 
+ *  should be added, subtracted, multiplied or divided to get 24. 
+ *  If none of the operations can give 24, return "Invalid".  
+ */
+std::string operation(int num1, int num2) {
+	std::string result = "Invalid";
+		if (num1 + num2 == 24) {
+			result = "added";
+		} 
+		else if ((num1 - num2 == 24) || (num2 - num1 == 24)) {
+			result = "subtracted";
+		} 
+		else if (num1 * num2 == 24) {
+			result = "multiplied"; 
+		} 
+		else if (((0 != num2) && (num1 / num2 == 24)) || ((0 != num1) && (num2 / num1 == 24))) {
+			result = "divided"; 
+	  }
+	return result;
+}

+ 8 - 0
Add-Subtract-Multiply-or-Divide/unitTest.cpp

@@ -0,0 +1,8 @@
+Describe(basic_tests)
+{
+  It(test1){Assert::That(operation(12, 12), Equals("added"));}
+	It(test2){Assert::That(operation(100, 76), Equals("subtracted"));}
+	It(test3){Assert::That(operation(6, 4), Equals("multiplied"));}
+	It(test4){Assert::That(operation(528, 22), Equals("divided"));}
+	It(test5){Assert::That(operation(10, 12), Equals("Invalid"));}
+};

+ 32 - 0
All-Rotations-of-a-String/README.md

@@ -0,0 +1,32 @@
+# All Rotations of a String
+by Helen Yu
+tags: strings, loops
+
+## Summary
+> Create a left rotation and a right rotation function that returns all the left rotations and right rotations of a string.
+> Examples
+> leftRotations("abc") ➞ ["abc", "bca", "cab"]
+> rightRotations("abc") ➞ ["abc", "cab", "bca"]
+> leftRotations("abcdef")
+> ➞ ["abcdef", "bcdefa", "cdefab", "defabc", "efabcd", "fabcde"]
+> rightRotations("abcdef")
+> ➞ ["abcdef", "fabcde", "
+
+## Instructions
+Create a **left rotation** and a **right rotation** function that returns all the left rotations and right rotations of a string.
+
+### Examples
+```
+leftRotations("abc") ➞ ["abc", "bca", "cab"]
+
+rightRotations("abc") ➞ ["abc", "cab", "bca"]
+
+leftRotations("abcdef") 
+➞ ["abcdef", "bcdefa", "cdefab", "defabc", "efabcd", "fabcde"]
+
+rightRotations("abcdef") 
+➞ ["abcdef", "fabcde", "efabcd", "defabc", "cdefab", "bcdefa"]
+```
+
+### Notes
+N/A

+ 34 - 0
All-Rotations-of-a-String/code.cpp

@@ -0,0 +1,34 @@
+/*  Create a left rotation and a right rotation function 
+ *  that returns all the left rotations and right rotations of a string.
+ *  leftRotations("abc") ➞ ["abc", "bca", "cab"]
+ *  rightRotations("abc") ➞ ["abc", "cab", "bca"]
+ */
+//  left rotation takes the front character and adds it to the back
+std::vector<std::string> leftRotations(std::string str) {
+	std::vector<std::string> result = {str};
+	//  function will run for the length of a string
+	for(int i = 0;i<str.size()-1; i++){
+		//  access first character, add to end of string
+		str.push_back(str[0]);
+		//  access first character, remove it from string
+		str.erase(str.begin());
+		//  now that string has been modified, add to result
+		result.push_back(str);
+	}
+	return result;
+}
+//  right rotation takes the back character and adds it to the front
+std::vector<std::string> rightRotations(std::string str) {
+		std::vector<std::string> result = {str};
+		int end = str.size()-1;
+	//  function will run for the length of a string
+	for(int i = 0;i<end; i++){
+		//  access last character, add to begin of string
+		str.insert(str.begin(),str[end]);
+		//  access last character, remove it from string
+		str.erase(str.end()-1);
+		//  now that string has been modified, add to result
+		result.push_back(str);
+	}
+	return result;
+}

+ 70 - 0
All-Rotations-of-a-String/unitTest.cpp

@@ -0,0 +1,70 @@
+Describe(all_left_rotations)
+{
+	It(T1){Assert::That(leftRotations("abc"), Equals(std::vector<std::string>({
+		"abc", 
+		"bca", 
+		"cab"
+	})));}
+	
+	It(T2){Assert::That(leftRotations("abcdef"), Equals(std::vector<std::string>({
+		"abcdef", 
+		"bcdefa", 
+		"cdefab", 
+		"defabc", 
+		"efabcd", 
+		"fabcde"
+	})));}
+	
+	It(T3){Assert::That(leftRotations("himalaya"), Equals(std::vector<std::string>({
+		"himalaya", 
+		"imalayah", 
+	  "malayahi", 
+		"alayahim", 
+		"layahima", 
+		"ayahimal", 
+		"yahimala", 
+		"ahimalay"
+	})));}
+	
+	It(T4){Assert::That(leftRotations("aab"), Equals(std::vector<std::string>({
+		"aab", 
+		"aba",
+		"baa"
+	})));}
+};
+
+
+Describe(all_right_rotations)
+{
+	It(T1){Assert::That(rightRotations("abc"), Equals(std::vector<std::string>({
+		"abc", 
+		"cab", 
+		"bca"
+	})));}
+	
+	It(T2){Assert::That(rightRotations("abcdef"), Equals(std::vector<std::string>({
+		"abcdef", 
+		"fabcde", 
+		"efabcd", 
+		"defabc", 
+		"cdefab", 
+		"bcdefa"
+	})));}
+	
+	It(T3){Assert::That(rightRotations("himalaya"), Equals(std::vector<std::string>({
+		"himalaya", 
+		"ahimalay", 
+		"yahimala", 
+		"ayahimal", 
+		"layahima", 
+		"alayahim", 
+		"malayahi", 
+		"imalayah"
+	})));}
+	
+	It(T4){Assert::That(rightRotations("aab"), Equals(std::vector<std::string>({
+		"aab", 
+		"baa",
+		"aba"
+	})));}
+};

+ 27 - 0
Are-the-Numbers-Equal/README.md

@@ -0,0 +1,27 @@
+# Are the Numbers Equal?
+by Matt
+tags: conditions, logic, language_fundamentals
+
+## Summary
+> Create a function that takes two integers and checks if they are equal.
+> Examples
+> isEqual(5, 6) ➞ false
+> isEqual(1, 1) ➞ true
+> isEqual(36, 35) ➞ false
+> Notes
+> N/A
+
+## Instructions
+Create a function that takes two integers and checks if they are equal.
+
+### Examples
+```
+isEqual(5, 6) ➞ false
+
+isEqual(1, 1) ➞ true
+
+isEqual(36, 35) ➞ false
+```
+
+### Notes
+N/A

+ 3 - 0
Are-the-Numbers-Equal/code.cpp

@@ -0,0 +1,3 @@
+bool isEqual(int num1, int num2) {
+	return num1==num2;
+}

+ 8 - 0
Are-the-Numbers-Equal/unitTest.cpp

@@ -0,0 +1,8 @@
+Describe(tests)
+{
+  It(test1){Assert::That(isEqual(2, 2), Equals(true));}
+	It(test2){Assert::That(isEqual(88, 88), Equals(true));}
+	It(test3){Assert::That(isEqual(36, 35), Equals(false));}
+	It(test4){Assert::That(isEqual(1, 1), Equals(true));}
+	It(test5){Assert::That(isEqual(5, 6), Equals(false));}
+};

+ 33 - 0
Area-of-a-Triangle/README.md

@@ -0,0 +1,33 @@
+# Area of a Triangle
+by Helen Yu
+tags: math, numbers
+
+## Summary
+> Write a function that takes the base and height of a triangle and return its area.
+> Examples
+> triArea(3, 2) ➞ 3
+> triArea(7, 4) ➞ 14
+> triArea(10, 10) ➞ 50
+> Notes
+> The area of a triangle is: (base * height) / 2
+> Don't forget to return the result.
+> If you get stuck on a challenge, find help in the Resources tab.
+> If you're really stuck, unlock solutions in the Solutio
+
+## Instructions
+Write a function that takes the base and height of a triangle and `return` its area.
+
+### Examples
+```
+triArea(3, 2) ➞ 3
+
+triArea(7, 4) ➞ 14
+
+triArea(10, 10) ➞ 50
+```
+
+### Notes
+- The area of a triangle is: `(base * height) / 2`
+- Don't forget to `return` the result.
+- If you get stuck on a challenge, find help in the **Resources** tab.
+- If you're *really* stuck, unlock solutions in the **Solutions** tab.

+ 3 - 0
Area-of-a-Triangle/code.cpp

@@ -0,0 +1,3 @@
+int triArea(int base, int height) {
+	return (base*height)/2;
+}

+ 8 - 0
Area-of-a-Triangle/unitTest.cpp

@@ -0,0 +1,8 @@
+Describe(area_of_triangle)
+{
+	It(test1){Assert::That(triArea(3, 2), Equals(3));}
+	It(test2){Assert::That(triArea(5, 4), Equals(10));}
+	It(test3){Assert::That(triArea(10, 10), Equals(50));}
+	It(test4){Assert::That(triArea(0, 60), Equals(0));}
+	It(test5){Assert::That(triArea(12, 11), Equals(66));}
+};

+ 29 - 0
Atbash-Cipher/README.md

@@ -0,0 +1,29 @@
+# Atbash Cipher
+by Matt
+tags: strings, formatting, cryptography
+
+## Summary
+> The Atbash cipher is an encryption method in which each letter of a word is replaced with its "mirror" letter in the alphabet: A  Z; B  Y; C  X; etc.
+> Create a function that takes a string and applies the Atbash cipher to it.
+> Examples
+> atbash("apple") ➞ "zkkov"
+> atbash("Hello world!") ➞ "Svool dliow!"
+> atbash("Christmas is the 25th of December") ➞ "Xsirhgnzh r
+
+## Instructions
+The Atbash cipher is an encryption method in which each letter of a word is replaced with its "mirror" letter in the alphabet: A <=> Z; B <=> Y; C <=> X; etc.
+
+Create a function that takes a string and applies the Atbash cipher to it.
+
+### Examples
+```
+atbash("apple") ➞ "zkkov"
+
+atbash("Hello world!") ➞ "Svool dliow!"
+
+atbash("Christmas is the 25th of December") ➞ "Xsirhgnzh rh gsv 25gs lu Wvxvnyvi"
+```
+
+### Notes
+- Capitalisation should be retained.
+- Non-alphabetic characters should not be altered.

+ 22 - 0
Atbash-Cipher/code.cpp

@@ -0,0 +1,22 @@
+/*  The Atbash cipher is an encryption method in which each letter 
+ *  of a word is replaced with its "mirror" letter in the alphabet: 
+ *  A <=> Z; B <=> Y; C <=> X; etc.
+ *  Create a function that takes a string and applies the Atbash cipher to it.
+ *  Capitalisation should be retained.
+ *  Non-alphabetic characters should not be altered.
+ */
+std::string atbash(std::string str) {
+	std::string normal = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
+	std::string bashed = "zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA";	
+	for(int j = 0;j<str.size();j++){
+		for(int i = 0;i<normal.size();i++){
+				//  check the string character with normal character
+				if(str[j] == normal[i]){
+					//  a match has been found
+					//  replace found character with corresponding bashed character
+					str[j] = bashed[i];break;
+				}
+		}
+	}
+	return str;
+}

+ 7 - 0
Atbash-Cipher/unitTest.cpp

@@ -0,0 +1,7 @@
+Describe(basic_tests)
+{
+  It(test1){Assert::That(atbash("abcdefghijklmnopqrstuvwxyz"), Equals("zyxwvutsrqponmlkjihgfedcba"));}
+	It(test2){Assert::That(atbash("ABCDEFGHIJKLMNOPQRSTUVWXYZ"), Equals("ZYXWVUTSRQPONMLKJIHGFEDCBA"));}
+	It(test3){Assert::That(atbash("The word 'atbash' derives from the the first and last 2 letters of the Hebrew alphabet."), Equals("Gsv dliw 'zgyzhs' wvirevh uiln gsv gsv urihg zmw ozhg 2 ovggvih lu gsv Svyivd zokszyvg."));}
+	It(test4){Assert::That(atbash("Vmxibkgrlm zmw wvxibkgrlm ziv rwvmgrxzo uli gsv Zgyzhs xrksvi."), Equals("Encryption and decryption are identical for the Atbash cipher."));}
+};

+ 27 - 0
Basic-Calculator/README.md

@@ -0,0 +1,27 @@
+# Basic Calculator
+by Matt
+tags: algebra, math, numbers
+
+## Summary
+> Create a function that takes two numbers and a mathematical operator + - / * and will perform a calculation with the given numbers.
+> Examples
+> calculator(2, '+', 2) ➞ 4
+> calculator(2, '*', 2) ➞ 4
+> calculator(4, '/', 2) ➞ 2
+> Notes
+> If the input tries to divide by 0, return 0.
+
+## Instructions
+Create a function that takes two numbers and a mathematical operator `+ - / *` and will perform a calculation with the given numbers.
+
+### Examples
+```
+calculator(2, '+', 2) ➞ 4
+
+calculator(2, '*', 2) ➞ 4
+
+calculator(4, '/', 2) ➞ 2
+
+```
+### Notes
+If the input tries to divide by 0, return `0`.

+ 13 - 0
Basic-Calculator/code.cpp

@@ -0,0 +1,13 @@
+/*  Create a function that takes two numbers and a 
+ *  mathematical operator + - / * and will perform 
+ *  a calculation with the given numbers.
+ */
+int calculator(int num1, char op, int num2) {
+	switch (op){
+		case '*': return num1 * num2; 
+	// condition ? value_if_true : value_if_false <- ternary statement example
+		case '/': return (num2==0) ? 0 : num1/num2;
+		case '+': return num1 + num2; 
+		case '-': return num1 - num2; 	
+	}
+}

+ 10 - 0
Basic-Calculator/unitTest.cpp

@@ -0,0 +1,10 @@
+Describe(basic_tests)
+{
+  It(test1){Assert::That(calculator(2, '/', 2), Equals(1));}
+	It(test2){Assert::That(calculator(10, '-', 7), Equals(3));}
+	It(test3){Assert::That(calculator(2, '*', 16), Equals(32));}
+	It(test4){Assert::That(calculator(2, '-', 2), Equals(0));}
+	It(test5){Assert::That(calculator(15, '+', 26), Equals(41));}
+	It(test6){Assert::That(calculator(2, '+', 2), Equals(4));}
+	It(test7){Assert::That(calculator(2, '/', 0), Equals(0));} // Can't divide by 0!
+};

+ 34 - 0
Bit-Rotation/README.md

@@ -0,0 +1,34 @@
+# Bit Rotation
+by Matt
+tags: bit_operations, strings
+
+## Summary
+> C++ offers some bit operations but not bit rotation. To complete that, create a function that takes three parameters:
+> n: Integer, which in binary representaion should be rotated.
+> m:  Number of rotation steps that should be performed.
+> d: Boolean value; true = rotation right, false = rotation left.
+> Your function should return an integer as a result of its rota
+
+## Instructions
+C++ offers some bit operations but not bit rotation. To complete that, create a function that takes three parameters:
+
+1. `n`: Integer, which in binary representaion should be rotated.
+2. `m`:  Number of rotation steps that should be performed.
+3. `d`: Boolean value; `true` = rotation right, `false` = rotation left.
+
+Your function should return an integer as a result of its rotated binary representation.
+
+### Examples
+```
+bitRotate(8, 1, true) ➞ 4
+// 8 in bin: 1000, rotated 1 step to the right: 0100, in dec: 4
+
+bitRotate(16, 1, false) ➞ 1
+// 16 in bin: 10000, rotated 1 step to the left: 00001, in dec: 1
+
+bitRotate(17, 2, false) ➞ 6
+// 17 in bin: 10001, rotated 2 steps to the left: 00110, in dec: 6
+```
+
+### Notes
+For parameters use unsigned integers only.

+ 30 - 0
Bit-Rotation/code.cpp

@@ -0,0 +1,30 @@
+/*  C++ offers some bit operations but not bit rotation. To complete that,
+ *  create a function that takes three parameters:
+ *  n: Integer, which in binary representaion should be rotated.
+ *  m: Number of rotation steps that should be performed.
+ *  d: Boolean value; true = rotation right, false = rotation left.
+ *  Your function should return an integer as a result of its rotated
+ *  binary representation.
+ *  bitRotate(8, 1, true) ➞ 4
+ *  8 in bin: 1000, rotated 1 step to the right: 0100, in dec: 4
+ *  For parameters use unsigned integers only.
+ */
+int bitRotate(int n, int m, bool d) {
+    int p = n, c = 1, b = 1;
+    //  find the power of the input
+    while(p/=2) c++;
+    //  short circuit if power and rotations are the same
+    if(c==m)return n;
+    //  set the bracket for the input
+    b<<=c;b--;
+  //  check each rotation to see if over the bracket and rotate  
+	for(int i = 0;i<m;i++){
+        if(d /*right*/){
+           if(n&1) n += (b+1); n >>= 1;
+        } else /*left*/ {
+            n <<= 1; if(n>b) n -= b;
+        }
+    }
+    return n;
+    //  return d? n<<m : n>>m; <<== should be as simple as this
+}

+ 12 - 0
Bit-Rotation/unitTest.cpp

@@ -0,0 +1,12 @@
+Describe(basic_tests)
+{
+  It(test1){Assert::That(bitRotate(8, 1, true), Equals(4));}
+	It(test2){Assert::That(bitRotate(16, 2, true), Equals(4));}
+	It(test3){Assert::That(bitRotate(283, 7, true), Equals(110));}
+	It(test4){Assert::That(bitRotate(16, 1, false), Equals(1));}
+	It(test5){Assert::That(bitRotate(17, 2, false), Equals(6));}
+	It(test6){Assert::That(bitRotate(122, 7, false), Equals(122));}
+	It(test7){Assert::That(bitRotate(125, 10, true), Equals(95));}
+	It(test8){Assert::That(bitRotate(1022, 8, false), Equals(767));}
+	It(test9){Assert::That(bitRotate(33, 6, true), Equals(33));}
+};

+ 34 - 0
Body-Mass-Index/README.md

@@ -0,0 +1,34 @@
+# Body Mass Index
+by Matt
+tags: strings, math
+
+## Summary
+> Body Mass Index (BMI) is found by taking your weight in kilograms and dividing by the square of your height in meters. The BMI categories are:
+> Underweight: <18.5
+> Normal weight: 18.5–24.9
+> Overweight: 25–29.9
+> Obesity: BMI of 30 or greater
+> Create a function that will accept weight and height (in kilos, pounds, meters, or inches) and return the BMI and the assoc
+
+## Instructions
+Body Mass Index (BMI) is found by taking your weight in kilograms and dividing by the square of your height in meters. The BMI categories are:
+
+- Underweight: <18.5
+- Normal weight: 18.5–24.9
+- Overweight: 25–29.9
+- Obesity: BMI of 30 or greater
+
+Create a function that will accept weight and height (in kilos, pounds, meters, or inches) and return the BMI and the associated category. Round the BMI to nearest tenth.
+
+### Examples
+```
+BMI("205 pounds", "73 inches") ➞ "27.0 Overweight"
+
+BMI("55 kilos", "1.65 meters") ➞ "20.2 Normal weight"
+
+BMI("154 pounds", "2 meters") ➞ "17.5 Underweight"
+```
+
+### Notes
+- 1 inch = .0254 meter
+- 1 pound = 0.453592 kilo

+ 47 - 0
Body-Mass-Index/code.cpp

@@ -0,0 +1,47 @@
+/*  Body Mass Index (BMI) is found by taking your weight
+ *  in kilograms and dividing by the square of your height in meters. 
+ *  The BMI categories are:
+ *  Underweight: <18.5
+ *  Normal weight: 18.5–24.9
+ *  Overweight: 25–29.9
+ *  Obesity: BMI of 30 or greater
+ *  Create a function that will accept weight and height
+ *  (in kilos, pounds, meters, or inches) and return the BMI 
+ *  and the associated category. Round the BMI to nearest tenth.
+ *  1 inch = .0254 meter
+ *  1 pound = 0.453592 kilo
+ */
+#include <cmath>
+#include <iomanip>
+std::string BMI(std::string weight, std::string height) {
+	//  stoi weight & height to isolate integers
+	float w = std::stof(weight /*size_t* idx = 0, int base = 10*/);
+	float h = std::stof(height);
+	//  find pounds or feet to determine if a conversion needs to happen
+	if(std::string::npos != weight.find("pounds")){
+		w = w *  0.453592;
+	}
+	if(std::string::npos != height.find("inches")){
+		h = h * .0254;
+	}
+	//  bmi is weight in kilograms and dividing by the square of your height in meters
+	std::string bmi = std::to_string(round(10*(w/(h*h)))/10);
+	// find decimal point position
+	int pos = bmi.find(".");
+	// substring decimal location  + 1
+	bmi = bmi.substr(0,pos+2);
+	float bmiFloat = round(10*(w/(h*h)))/10;
+	if(18.5>bmiFloat){
+		return bmi + " Underweight";
+	}
+	if(24.9>=bmiFloat){
+		return bmi + " Normal weight";	
+	}
+	if(29.9>=bmiFloat){
+		return bmi + " Overweight";
+	}
+	if(30<=bmiFloat){
+		return bmi + " Obesity";
+	}
+	
+}

+ 8 - 0
Body-Mass-Index/unitTest.cpp

@@ -0,0 +1,8 @@
+Describe(basic_tests)
+{
+  It(test1){Assert::That(BMI("53.3 kilos","1.7 meters"), Equals("18.4 Underweight"));}
+	It(test2){Assert::That(BMI("76.8 kilos","1.6 meters"), Equals("30.0 Obesity"));}
+	It(test3){Assert::That(BMI("53.5 kilos","1.7 meters"), Equals("18.5 Normal weight"));}
+	It(test4){Assert::That(BMI("155 pounds","73 inches"), Equals("20.4 Normal weight"));}
+	It(test5){Assert::That(BMI("175 pounds","70 inches"), Equals("25.1 Overweight"));}
+};

+ 26 - 0
Capitalize-the-Names/README.md

@@ -0,0 +1,26 @@
+# Capitalize the Names
+by Alex Golubov
+tags: loops, arrays, formatting
+
+## Summary
+> Create a function that takes an array of names and returns an array where only the first letter of each name is capitalized.
+> Examples
+> capMe(["mavis", "senaida", "letty"]) ➞ ["Mavis", "Senaida", "Letty"]
+> capMe(["samuel", "MABELLE", "letitia", "meridith"]) ➞ ["Samuel", "Mabelle", "Letitia", "Meridith"]
+> capMe(["Slyvia", "Kristal", "Sharilyn", "Calista"]) ➞ ["S
+
+## Instructions
+Create a function that takes an array of names and returns an array where only the first letter of each name is capitalized.
+
+### Examples
+```
+capMe(["mavis", "senaida", "letty"]) ➞ ["Mavis", "Senaida", "Letty"]
+
+capMe(["samuel", "MABELLE", "letitia", "meridith"]) ➞ ["Samuel", "Mabelle", "Letitia", "Meridith"]
+
+capMe(["Slyvia", "Kristal", "Sharilyn", "Calista"]) ➞ ["Slyvia", "Kristal", "Sharilyn", "Calista"]
+```
+
+### Notes
+- Don't change the order of the original array.
+- Notice in the second example above, "MABELLE" is returned as "Mabelle".

+ 23 - 0
Capitalize-the-Names/code.cpp

@@ -0,0 +1,23 @@
+/*  Create a function that takes an array of names and returns 
+ *  an array with the first letter capitalized.
+ *  Don't change the order of the original array.
+ *  Notice in the second example above, "MABELLE" is returned as "Mabelle".
+ */
+// make me a lowerCASER for christmas std::string vs string&
+void lowerCase(std::string& strToConvert){
+   for(unsigned int i=0;i<strToConvert.length();i++){
+      strToConvert[i] = tolower(strToConvert[i]);
+   }
+}
+std::vector<std::string> capMe(std::vector<std::string> arr) {
+	std::vector<std::string> aA;
+	for(int i = 0;i<arr.size();i++){
+	  // make all characters of each string in the array lower case
+		lowerCase(arr[i]);
+		// make the first character of each string in the array upper case
+		arr[i][0] = toupper(arr[i][0]);
+		// add each new string into a new array
+		aA.push_back(arr[i]);
+	}
+	return aA;
+}

+ 10 - 0
Capitalize-the-Names/unitTest.cpp

@@ -0,0 +1,10 @@
+Describe(cap_me)
+{
+  It(test1){Assert::That(capMe({"mavis", "senaida", "letty"}), Equals(std::vector<std::string>({"Mavis", "Senaida", "Letty"})));}
+  It(test2){Assert::That(capMe({"samuel", "MABELLE", "letitia", "meridith"}), Equals(std::vector<std::string>({"Samuel", "Mabelle", "Letitia", "Meridith"})));}
+  It(test3){Assert::That(capMe({"Slyvia", "Kristal", "Sharilyn", "Calista"}), Equals(std::vector<std::string>({"Slyvia", "Kristal", "Sharilyn", "Calista"})));}
+  It(test4){Assert::That(capMe({"krisTopher", "olIva", "herminiA"}), Equals(std::vector<std::string>({"Kristopher", "Oliva", "Herminia"})));}
+  It(test5){Assert::That(capMe({"luke", "marsha", "stanford"}), Equals(std::vector<std::string>({"Luke", "Marsha", "Stanford"})));}
+  It(test6){Assert::That(capMe({"kara"}), Equals(std::vector<std::string>({"Kara"})));}
+  It(test7){Assert::That(capMe({"mARIANN", "jOI", "gEORGEANN"}), Equals(std::vector<std::string>({"Mariann", "Joi", "Georgeann"})));}
+};

+ 34 - 0
ChartoASCII/README.md

@@ -0,0 +1,34 @@
+# Char-to-ASCII
+by Elgin
+tags: numbers, algorithms, strings
+
+## Summary
+> Create a function that returns the ASCII value of the passed in character.
+> Examples
+> ctoa('A') ➞ 65
+> ctoa('m') ➞ 109
+> ctoa('[') ➞ 91
+> ctoa('\') ➞ 92
+> Notes
+> Don't forget to return the result.
+> If you get stuck on a challenge, find help in the Resources tab.
+> If you're really stuck, unlock solutions in the Solutions tab.
+
+## Instructions
+Create a function that returns the ASCII value of the passed in character.
+
+### Examples
+```
+ctoa('A') ➞ 65
+
+ctoa('m') ➞ 109
+
+ctoa('[') ➞ 91
+
+ctoa('\') ➞ 92
+```
+
+### Notes
+- Don't forget to `return` the result.
+- If you get stuck on a challenge, find help in the **Resources** tab.
+- If you're *really* stuck, unlock solutions in the **Solutions** tab.

+ 6 - 0
ChartoASCII/code.cpp

@@ -0,0 +1,6 @@
+/*  Create a function that returns the ASCII value of the passed in character.
+ */ 
+
+unsigned short ctoa(char c) {
+	return c;
+}

+ 62 - 0
ChartoASCII/unitTest.cpp

@@ -0,0 +1,62 @@
+Describe(Char_to_ASCII)
+{
+  It(test1){Assert::That(ctoa(' '), Equals(32));}
+  It(test2){Assert::That(ctoa('A'), Equals(65));}
+  It(test3){Assert::That(ctoa('B'), Equals(66));}
+  It(test4){Assert::That(ctoa('C'), Equals(67));}
+  It(test5){Assert::That(ctoa('D'), Equals(68));}
+  It(test6){Assert::That(ctoa('E'), Equals(69));}
+  It(test7){Assert::That(ctoa('F'), Equals(70));}
+  It(test8){Assert::That(ctoa('G'), Equals(71));}
+  It(test9){Assert::That(ctoa('H'), Equals(72));}
+  It(test10){Assert::That(ctoa('I'), Equals(73));}
+  It(test11){Assert::That(ctoa('J'), Equals(74));}
+  It(test12){Assert::That(ctoa('K'), Equals(75));}
+  It(test13){Assert::That(ctoa('L'), Equals(76));}
+  It(test14){Assert::That(ctoa('M'), Equals(77));}
+  It(test15){Assert::That(ctoa('N'), Equals(78));}
+  It(test16){Assert::That(ctoa('O'), Equals(79));}
+  It(test17){Assert::That(ctoa('P'), Equals(80));}
+  It(test18){Assert::That(ctoa('Q'), Equals(81));}
+  It(test19){Assert::That(ctoa('R'), Equals(82));}
+  It(test20){Assert::That(ctoa('S'), Equals(83));}
+  It(test21){Assert::That(ctoa('T'), Equals(84));}
+  It(test22){Assert::That(ctoa('U'), Equals(85));}
+  It(test23){Assert::That(ctoa('V'), Equals(86));}
+  It(test24){Assert::That(ctoa('W'), Equals(87));}
+  It(test25){Assert::That(ctoa('X'), Equals(88));}
+  It(test26){Assert::That(ctoa('Y'), Equals(89));}
+  It(test27){Assert::That(ctoa('Z'), Equals(90));}
+  It(test28){Assert::That(ctoa('['), Equals(91));}
+  It(test29){Assert::That(ctoa('\\'), Equals(92));}
+  It(test30){Assert::That(ctoa(']'), Equals(93));}
+  It(test31){Assert::That(ctoa('^'), Equals(94));}
+  It(test32){Assert::That(ctoa('_'), Equals(95));}
+  It(test33){Assert::That(ctoa('`'), Equals(96));}
+  It(test34){Assert::That(ctoa('a'), Equals(97));}
+  It(test35){Assert::That(ctoa('b'), Equals(98));}
+  It(test36){Assert::That(ctoa('c'), Equals(99));}
+  It(test37){Assert::That(ctoa('d'), Equals(100));}
+  It(test38){Assert::That(ctoa('e'), Equals(101));}
+  It(test39){Assert::That(ctoa('f'), Equals(102));}
+  It(test40){Assert::That(ctoa('g'), Equals(103));}
+  It(test41){Assert::That(ctoa('h'), Equals(104));}
+  It(test42){Assert::That(ctoa('i'), Equals(105));}
+  It(test43){Assert::That(ctoa('j'), Equals(106));}
+  It(test44){Assert::That(ctoa('k'), Equals(107));}
+  It(test45){Assert::That(ctoa('l'), Equals(108));}
+  It(test46){Assert::That(ctoa('m'), Equals(109));}
+  It(test47){Assert::That(ctoa('n'), Equals(110));}
+  It(test48){Assert::That(ctoa('o'), Equals(111));}
+  It(test49){Assert::That(ctoa('p'), Equals(112));}
+  It(test50){Assert::That(ctoa('q'), Equals(113));}
+  It(test51){Assert::That(ctoa('r'), Equals(114));}
+  It(test52){Assert::That(ctoa('s'), Equals(115));}
+  It(test53){Assert::That(ctoa('t'), Equals(116));}
+  It(test54){Assert::That(ctoa('u'), Equals(117));}
+  It(test55){Assert::That(ctoa('v'), Equals(118));}
+  It(test56){Assert::That(ctoa('w'), Equals(119));}
+  It(test57){Assert::That(ctoa('x'), Equals(120));}
+  It(test58){Assert::That(ctoa('y'), Equals(121));}
+  It(test59){Assert::That(ctoa('z'), Equals(122));}
+};

+ 29 - 0
Check-If-the-Brick-Fits-through-the-Hole/README.md

@@ -0,0 +1,29 @@
+# Check If the Brick Fits through the Hole
+by Matt
+tags: conditions, validation
+
+## Summary
+> Write the function that takes three dimensions of a brick: height(a), width(b) and depth(c) and returns true if this brick can fit into a hole with the width(w) and height(h).
+> Examples
+> doesBrickFit(1, 1, 1, 1, 1) ➞ true
+> doesBrickFit(1, 2, 1, 1, 1) ➞ true
+> doesBrickFit(1, 2, 2, 1, 1) ➞ false
+> Notes
+> You can turn the brick with any side towards the hole.
+> We ass
+
+## Instructions
+Write the function that takes three dimensions of a brick: height(a), width(b) and depth(c) and returns `true` if this brick can fit into a hole with the width(w) and height(h).
+
+### Examples
+```
+doesBrickFit(1, 1, 1, 1, 1) ➞ true
+
+doesBrickFit(1, 2, 1, 1, 1) ➞ true
+
+doesBrickFit(1, 2, 2, 1, 1) ➞ false
+```
+
+### Notes
+- You can turn the brick with any side towards the hole.
+- We assume that the brick fits if its sizes equal the ones of the hole (i.e. brick size should be less than or equal to the size of the hole, not strickly less).

+ 18 - 0
Check-If-the-Brick-Fits-through-the-Hole/code.cpp

@@ -0,0 +1,18 @@
+/*  Write the function that takes three dimensions of a 
+ *  brick: height(a), width(b) and depth(c) and returns true 
+ *  if this brick can fit into a hole with the width(w) and height(h).
+ *  You can turn the brick with any side towards the hole.
+ *  We assume that the brick fits if its sizes equal the ones of the hole 
+ *  (i.e. brick size should be less than or equal to the size of the hole, 
+ *  not strickly less).
+ */
+// (a,b,c) -- dimensions of the brick
+// (w,h) -- dimensions of the hole
+bool doesBrickFit(int a, int b, int c,  int w, int h) {
+	//  put a,b,c into vector so sort can be used
+	std::vector <int> abc = {a,b,c};
+	//  put lowest two values of a,b,c into a,b
+	std::sort (abc.begin(),abc.end());
+	//  brick size should be less than or equal to the size of the hole
+	return (w >= abc[0] && h >= abc[1]) || (w >= abc[1] && h >= abc[0]);
+}

+ 9 - 0
Check-If-the-Brick-Fits-through-the-Hole/unitTest.cpp

@@ -0,0 +1,9 @@
+Describe(basic_tests)
+{
+  It(test1){Assert::That(doesBrickFit(1,1,1, 1,1), Equals(true));}
+	It(test2){Assert::That(doesBrickFit(1,2,1, 1,1), Equals(true));}
+	It(test3){Assert::That(doesBrickFit(1,2,2, 1,1), Equals(false));}
+	It(test4){Assert::That(doesBrickFit(1,2,2, 1,2), Equals(true));}
+	It(test5){Assert::That(doesBrickFit(1,2,2, 2,1), Equals(true));}
+	It(test6){Assert::That(doesBrickFit(2,2,2, 1,2), Equals(false));}
+};

+ 40 - 0
Check-String-for-Spaces/README.md

@@ -0,0 +1,40 @@
+# Check String for Spaces
+by Helen Yu
+tags: strings, regex, validation
+
+## Summary
+> Create a function that returns true if a string contains any spaces.
+> Examples
+> hasSpaces("hello") ➞ false
+> hasSpaces("hello, world") ➞ true
+> hasSpaces(" ") ➞ true
+> hasSpaces("") ➞ false
+> hasSpaces(",./!@#") ➞ false
+> Notes
+> An empty string does not contain any spaces.
+> Try doing this without RegEx.
+> Don't forget to return the result.
+> If you get stuck on a challeng
+
+## Instructions
+Create a function that returns `true` if a string contains any spaces.
+
+### Examples
+```
+hasSpaces("hello") ➞ false
+
+hasSpaces("hello, world") ➞ true
+
+hasSpaces(" ") ➞ true
+
+hasSpaces("") ➞ false
+
+hasSpaces(",./!@#") ➞ false
+```
+
+### Notes
+- An empty string does not contain any spaces.
+- Try doing this without RegEx.
+- Don't forget to `return` the result.
+- If you get stuck on a challenge, find help in the **Resources** tab.
+- If you're *really* stuck, unlock solutions in the **Solutions** tab.

+ 9 - 0
Check-String-for-Spaces/code.cpp

@@ -0,0 +1,9 @@
+/*  Create a function that returns true if a string contains any spaces.
+ */
+bool hasSpaces(std::string str) {
+	//  loop through each character in string, if its a space return true
+	for (int i = 0;i<str.size();i++){
+		if (' '==str[i]){return true;}
+	}
+	return false;
+}

+ 10 - 0
Check-String-for-Spaces/unitTest.cpp

@@ -0,0 +1,10 @@
+Describe(has_spaces)
+{
+  It(test1){Assert::That(hasSpaces("Foo"), Equals(false));}
+  It(test2){Assert::That(hasSpaces("Foo bar"), Equals(true));}
+	It(test3){Assert::That(hasSpaces("Foo "), Equals(true));}
+	It(test4){Assert::That(hasSpaces(" Foo"), Equals(true));}
+	It(test5){Assert::That(hasSpaces(" "), Equals(true));}
+	It(test6){Assert::That(hasSpaces(""), Equals(false));}
+	It(test7){Assert::That(hasSpaces(",./;'[]-="), Equals(false));}
+};

+ 27 - 0
Check-if-a-Number-is-a-Palindrome/README.md

@@ -0,0 +1,27 @@
+# Check if a Number is a Palindrome
+by Helen Yu
+tags: numbers, validation
+
+## Summary
+> Write a function that returns true if a number is a palindrome.
+> Examples
+> isPalindrome(838) ➞ true
+> isPalindrome(4433) ➞ false
+> isPalindrome(443344) ➞ true
+> Notes
+> N/A
+
+## Instructions
+Write a function that returns `true` if a number is a palindrome.
+
+### Examples
+```
+isPalindrome(838) ➞ true
+
+isPalindrome(4433) ➞ false
+
+isPalindrome(443344) ➞ true
+```
+
+### Notes
+N/A

+ 15 - 0
Check-if-a-Number-is-a-Palindrome/code.cpp

@@ -0,0 +1,15 @@
+/*  Write a function that returns true if a number is a palindrome.
+ */
+bool isPalindrome(int n) {
+	//std::string x = std::to_string(n);
+	//std::reverse(x.begin(),x.end());
+	//return std::to_string(n) == x;
+	// convert int to string
+	std::string newN = std::to_string(n);
+	for(int i=0;i<newN.size();i++){
+		if(newN[i]!=newN[newN.size()-1-i]){
+			return false;
+		}
+	}
+	return true;
+}

+ 9 - 0
Check-if-a-Number-is-a-Palindrome/unitTest.cpp

@@ -0,0 +1,9 @@
+Describe(number_is_palindrome)
+{
+	It(test1){Assert::That(isPalindrome(838), Equals(true));}
+	It(test2){Assert::That(isPalindrome(77), Equals(true));}
+	It(test3){Assert::That(isPalindrome(95159), Equals(true));}
+	It(test4){Assert::That(isPalindrome(839), Equals(false));}
+	It(test5){Assert::That(isPalindrome(4234), Equals(false));}
+	It(test6){Assert::That(isPalindrome(13), Equals(false));}
+};

+ 34 - 0
Check-if-an-Array-Contains-a-Given-Number/README.md

@@ -0,0 +1,34 @@
+# Check if an Array Contains a Given Number
+by Helen Yu
+tags: arrays, validation, language_fundamentals
+
+## Summary
+> Write a function to check if an array contains a particular number.
+> Examples
+> check([1, 2, 3, 4, 5], 3) ➞ true
+> check([1, 1, 2, 1, 1], 3) ➞ false
+> check([5, 5, 5, 6], 5) ➞ true
+> check([], 5) ➞ false
+> Notes
+> Don't forget to return the result.
+> If you get stuck on a challenge, find help in the Resources tab.
+> If you're really stuck, unlock solutions in the Solution
+
+## Instructions
+Write a function to check if an array contains a particular number.
+
+### Examples
+```
+check([1, 2, 3, 4, 5], 3) ➞ true
+
+check([1, 1, 2, 1, 1], 3) ➞ false
+
+check([5, 5, 5, 6], 5) ➞ true
+
+check([], 5) ➞ false
+```
+
+### Notes
+- Don't forget to `return` the result.
+- If you get stuck on a challenge, find help in the **Resources** tab.
+- If you're *really* stuck, unlock solutions in the **Solutions** tab.

+ 9 - 0
Check-if-an-Array-Contains-a-Given-Number/code.cpp

@@ -0,0 +1,9 @@
+/*  Write a function to check if an 
+ *  array contains a particular number.
+ */
+bool check(std::vector<int> arr, int el) {
+	for(int i = 0;i<arr.size();i++){
+		if(arr[i] == el){return true;}	
+	}
+	return false;
+}

+ 9 - 0
Check-if-an-Array-Contains-a-Given-Number/unitTest.cpp

@@ -0,0 +1,9 @@
+Describe(includes_element_tests)
+{
+	It(test1){Assert::That(check({1, 2, 3, 4, 5}, 3), Equals(true));}
+	It(test2){Assert::That(check({1, 1, 2, 1, 1}, 3), Equals(false));}
+	It(test3){Assert::That(check({1, 1, 2, 1, 5, 4, 7}, 7), Equals(true));}
+	It(test4){Assert::That(check({1, 1, 2, 1, 5, 4, 7}, 8), Equals(false));}
+	It(test5){Assert::That(check({5, 5, 5, 6}, 5), Equals(true));}
+	It(test6){Assert::That(check({}, 5), Equals(false));}
+};

+ 31 - 0
Check-if-an-Integer-is-Divisible-By-Five/README.md

@@ -0,0 +1,31 @@
+# Check if an Integer is Divisible By Five
+by Helen Yu
+tags: numbers, math, validation
+
+## Summary
+> Create a function that returns true if an integer is evenly divisible by 5, and false otherwise.
+> Examples
+> divisibleByFive(5) ➞ true
+> divisibleByFive(-55) ➞ true
+> divisibleByFive(37) ➞ false
+> Notes
+> Don't forget to return the result.
+> If you get stuck on a challenge, find help in the Resources tab.
+> If you're really stuck, unlock solutions in the Solutions tab.
+
+## Instructions
+Create a function that returns `true` if an integer is evenly divisible by 5, and `false` otherwise.
+
+### Examples
+```
+divisibleByFive(5) ➞ true
+
+divisibleByFive(-55) ➞ true
+
+divisibleByFive(37) ➞ false
+```
+
+### Notes
+- Don't forget to `return` the result.
+- If you get stuck on a challenge, find help in the **Resources** tab.
+- If you're *really* stuck, unlock solutions in the **Solutions** tab.

+ 4 - 0
Check-if-an-Integer-is-Divisible-By-Five/code.cpp

@@ -0,0 +1,4 @@
+bool divisibleByFive(int num) {
+	if (num%5==0) {return true;}
+	return false;
+}

+ 10 - 0
Check-if-an-Integer-is-Divisible-By-Five/unitTest.cpp

@@ -0,0 +1,10 @@
+Describe(divisible_by_five)
+{
+  It(test1){Assert::That(divisibleByFive(7), Equals(false));}
+  It(test2){Assert::That(divisibleByFive(5), Equals(true));}
+  It(test3){Assert::That(divisibleByFive(15), Equals(true));}
+  It(test4){Assert::That(divisibleByFive(33), Equals(false));}
+  It(test5){Assert::That(divisibleByFive(-18), Equals(false));}
+  It(test6){Assert::That(divisibleByFive(999), Equals(false));}
+  It(test7){Assert::That(divisibleByFive(2), Equals(false));}
+};

+ 31 - 0
Chess-Pieces/README.md

@@ -0,0 +1,31 @@
+# Chess Pieces
+by Matt
+tags: games, logic, algorithms, validation
+
+## Summary
+> Create a function that takes the name of a chess piece, its position and a target position. The function should return true if the piece can move to the target and false if it can't.
+> The possible inputs are "Pawn", "Knight", "Bishop", "Rook", "Queen" and "King".
+> Examples
+> canMove("Rook", "A8", "H8") ➞ true
+> canMove("Bishop", "A7", "G1") ➞ true
+> canMove("Queen
+
+## Instructions
+Create a function that takes the name of a chess piece, its position and a target position. The function should return `true` if the piece can move to the target and `false` if it can't.
+
+The possible inputs are "Pawn", "Knight", "Bishop", "Rook", "Queen" and "King".
+
+### Examples
+```
+canMove("Rook", "A8", "H8") ➞ true
+
+canMove("Bishop", "A7", "G1") ➞ true
+
+canMove("Queen", "C4", "D6") ➞ false
+```
+
+### Notes
+- Do not include pawn capture moves and en passant.
+- Do not include castling.
+- Remember to include pawns' two-square move on the second rank!
+- Look for patterns in the movement of the pieces.

+ 62 - 0
Chess-Pieces/code.cpp

@@ -0,0 +1,62 @@
+/*  Create a function that takes the name of a chess piece, 
+ *  its position and a target position. The function should return true
+ *  if the piece can move to the target and false if it can't.
+ *  Do not include pawn capture moves and en passant.
+ *  Do not include castling.
+ *  Remember to include pawns' two-square move on the second rank!
+ *  Look for patterns in the movement of the pieces.
+ *  The possible inputs are: 
+ * "Pawn", "Knight", "Bishop", "Rook", "Queen" and "King".
+ */
+bool canMove(std::string piece, std::string current, std::string target) {
+		int colDistance = abs(target[0]-current[0]);
+		int rowDistance = abs(target[1]-current[1]);
+	if("Pawn" == piece){
+		//  must stay in the same column
+		if(current[0]==target[0]){
+		  //  can move +/-2 or +/-1 from rows 7 and 2
+			if(current[1]=='7' || current[1]=='2'){
+				if(rowDistance==1 || rowDistance==2){
+					return true;
+				}
+			}
+		  //  can move +/-1 in all other rows
+			else {if(rowDistance==1) {return true;}}
+		}
+	} // end of pawn
+	else if("King"==piece){
+		//  the king can move +/-1 in any direction
+		if(colDistance<=1 && rowDistance<=1){
+			return true;
+		}
+	} // end of king
+	else if("Queen"==piece){
+		// to move diagonal the column distance and row distance MUST be the same
+		if(colDistance==rowDistance){
+			return true;
+		}
+		// to move in a line, the column distance or row distance must be 0
+		if(colDistance==0 || rowDistance==0){
+			return true;
+		}
+	} // end of Queen
+	else if("Rook"==piece){
+		// to move in a line, the column distance or row distance must be 0
+		if(colDistance==0 || rowDistance==0){
+			return true;
+	  }
+	} // end of Rook
+	else if("Bishop"==piece){
+		// to move diagonal the column distance and row distance MUST be the same
+		if(colDistance==rowDistance){
+			return true;
+		}
+	} // end of Bishop
+	else if("Knight"==piece){
+		// knights move +2 in either row/column and +1 in column/row
+		if((colDistance==2 && rowDistance==1) ||(colDistance==1 && rowDistance==2 )){
+			return true;
+		}
+	}
+	return false;
+}

+ 16 - 0
Chess-Pieces/unitTest.cpp

@@ -0,0 +1,16 @@
+Describe(basic_tests)
+{
+  It(test1){Assert::That(canMove("Pawn", "A5", "A6"), Equals(true));}
+	It(test2){Assert::That(canMove("Pawn", "G2", "G4"), Equals(true));}
+	It(test3){Assert::That(canMove("Pawn", "C6", "D7"), Equals(false));}
+	It(test4){Assert::That(canMove("Knight", "F5", "E3"), Equals(true));}
+	It(test5){Assert::That(canMove("Knight", "F6", "E5"), Equals(false));}
+	It(test6){Assert::That(canMove("Bishop", "B4", "E7"), Equals(true));}
+	It(test7){Assert::That(canMove("Bishop", "B6", "F5"), Equals(false));}
+	It(test8){Assert::That(canMove("Rook", "A8", "H8"), Equals(true));}
+	It(test9){Assert::That(canMove("Rook", "A8", "H7"), Equals(false));}
+	It(test10){Assert::That(canMove("Queen", "A8", "H1"), Equals(true));}
+	It(test11){Assert::That(canMove("Queen", "A6", "H4"), Equals(false));}
+	It(test12){Assert::That(canMove("King", "C4", "D5"), Equals(true));}
+	It(test13){Assert::That(canMove("King", "B7", "B5"), Equals(false));}
+};

+ 52 - 0
Christmas-Tree/README.md

@@ -0,0 +1,52 @@
+# Christmas Tree
+by Helen Yu
+tags: formatting, strings
+
+## Summary
+> Write a function to create a Christmas tree based on height h.
+> Examples
+> tree(1) ➞ [
+>   "#"
+> ]
+> tree(2) ➞ [
+>   " # ",
+>   "###"
+> ]
+> tree(5) ➞ [
+>   "    #    ",
+>   "   ###   ",
+>   "  #####  ",
+>   " ####### ",
+>   "#########"
+> ]
+> tree(0) ➞ []
+> Notes
+> N/A
+
+## Instructions
+Write a function to create a Christmas tree based on height `h`.
+
+### Examples
+```
+tree(1) ➞ [
+  "#"
+]
+
+tree(2) ➞ [
+  " # ",
+  "###"
+]
+
+tree(5) ➞ [
+  "    #    ",
+  "   ###   ",
+  "  #####  ",
+  " ####### ",
+  "#########"
+]
+
+tree(0) ➞ []
+```
+
+### Notes
+N/A

+ 45 - 0
Christmas-Tree/code.cpp

@@ -0,0 +1,45 @@
+/*  Write a function to create a Christmas tree based on height h.
+ *  		tree(0) ➞ []
+ *  		tree(1) ➞ 
+							"#"
+				tree(2) ➞
+						" # ",
+						"###"
+				tree(5) ➞ 
+					"    #    ",
+					"   ###   ",
+					"  #####  ",
+					" ####### ",
+					"#########"
+// 0000 5 0000
+// 000 555 000
+// 00 55555 00
+// 0 5555555 0
+//  555555555
+//  the "whorls" [each level of the tree] are odd in length.
+//  the integer passed to the function will create 
+//  "h" amount of strings. 
+//  the length of each whorl is "h" +"h-1"
+//  airSpace ("air") around the branches is "air"
+std::vector<std::string> treeX(int h) {
+	std::vector<std::string> whorl;
+	int maxWhorl = h + (h-1);
+	for(;h>0;h--){
+		c = "#";
+		// create the base of the tree & maxWhorl
+	}
+}
+*/
+std::vector<std::string> tree(int h) {
+	std::vector<std::string> r;
+	// set the base whorl (abs protects against 0 height tree)
+	std::string base = std::string(abs(h+h-1),'#');
+	for(int i=0;i<h;i++){
+		// prepend previous whorl to tree
+		r.insert(r.begin(),base);
+		// reduce size of whorl for next loop
+		base[base.size()-i-1] = ' ';
+		base[i] = ' ';
+	}
+	return r;
+}

+ 23 - 0
Christmas-Tree/unitTest.cpp

@@ -0,0 +1,23 @@
+Describe(christmas_tree_tests)
+{
+	It(test1){Assert::That(tree(1), Equals(std::vector<std::string>({"#"})));}
+	
+	It(test2) {
+		Assert::That(tree(2), Equals(std::vector<std::string>({
+		" # ", 
+		"###"
+		})));
+	}
+	
+	It(test3) {
+		Assert::That(tree(5), Equals(std::vector<std::string>({
+		"    #    ",
+		"   ###   ", 
+		"  #####  ", 
+		" ####### ", 
+		"#########"
+		})));
+	}
+	
+	It(should_work_for_a_tree_of_height_zero){Assert::That(tree(0), Equals(std::vector<std::string>({})));} 
+};

+ 30 - 0
Compare-Strings-by-Count-of-Characters/README.md

@@ -0,0 +1,30 @@
+# Compare Strings by Count of Characters
+by Helen Yu
+tags: strings, conditions, validation
+
+## Summary
+> Create a function that takes two strings as arguments and return either true or false depending on whether the total number of characters in the first string is equal to the total number of characters in the second string.
+> Examples
+> comp("AB", "CD") ➞ true
+> comp("ABC", "DE") ➞ false
+> comp("hello", "edabit") ➞ false
+> Notes
+> Don't forget to return the result.
+> If
+
+## Instructions
+Create a function that takes two strings as arguments and return either `true` or `false` depending on whether the total number of characters in the first string is equal to the total number of characters in the second string.
+
+### Examples
+```
+comp("AB", "CD") ➞ true
+
+comp("ABC", "DE") ➞ false
+
+comp("hello", "edabit") ➞ false
+```
+
+### Notes
+- Don't forget to `return` the result.
+- If you get stuck on a challenge, find help in the **Resources** tab.
+- If you're *really* stuck, unlock solutions in the **Solutions** tab.

+ 3 - 0
Compare-Strings-by-Count-of-Characters/code.cpp

@@ -0,0 +1,3 @@
+bool comp(std::string str1, std::string str2) {
+	return str1.size() == str2.size();
+}

+ 10 - 0
Compare-Strings-by-Count-of-Characters/unitTest.cpp

@@ -0,0 +1,10 @@
+Describe(comparing_length_of_two_words)
+{
+  It(test1){Assert::That(comp("AB", "CD"), Equals(true));}
+	It(test2){Assert::That(comp("ABC", "DE"), Equals(false));}
+	It(test3){Assert::That(comp("hello", "edabit"), Equals(false));}
+	It(test4){Assert::That(comp("meow", "woof"), Equals(true));}
+	It(test5){Assert::That(comp("jrnvjrnnt", "cvjknfjvmfvnfjn"), Equals(false));}
+	It(test6){Assert::That(comp("jkvnjrt", "krnf"), Equals(false));}
+	It(test7){Assert::That(comp("Facebook", "Snapchat"), Equals(true));}
+};

+ 31 - 0
Concatenate-First-and-Last-Name-into-One-String/README.md

@@ -0,0 +1,31 @@
+# Concatenate First and Last Name into One String
+by Helen Yu
+tags: strings, formatting
+
+## Summary
+> Given two strings, firstName and lastName, return a single string in the format "last, first".
+> Examples
+> concatName("First", "Last") ➞ "Last, First"
+> concatName("John", "Doe") ➞ "Doe, John"
+> concatName("Mary", "Jane") ➞ "Jane, Mary"
+> Notes
+> Don't forget to return the result.
+> If you get stuck on a challenge, find help in the Resources tab.
+> If you're really stuck
+
+## Instructions
+Given two strings, `firstName` and `lastName`, return a single string in the format "last, first".
+
+### Examples
+```
+concatName("First", "Last") ➞ "Last, First"
+
+concatName("John", "Doe") ➞ "Doe, John"
+
+concatName("Mary", "Jane") ➞ "Jane, Mary"
+```
+
+### Notes
+- Don't forget to `return` the result.
+- If you get stuck on a challenge, find help in the **Resources** tab.
+- If you're *really* stuck, unlock solutions in the **Solutions** tab.

+ 3 - 0
Concatenate-First-and-Last-Name-into-One-String/code.cpp

@@ -0,0 +1,3 @@
+std::string concatName(std::string firstName, std::string lastName) {
+	return lastName + ", " + firstName;
+}

+ 7 - 0
Concatenate-First-and-Last-Name-into-One-String/unitTest.cpp

@@ -0,0 +1,7 @@
+Describe(concatenate_first_last_name_tests)
+{
+	It(test1){Assert::That(concatName("John", "Doe"), Equals("Doe, John"));} 
+	It(test2){Assert::That(concatName("First", "Last"), Equals("Last, First"));}
+	It(test3){Assert::That(concatName("A", "B"), Equals("B, A"));}
+	It(test4){Assert::That(concatName(",", ","), Equals(",, ,"));}
+};

+ 31 - 0
Convert-Hours-and-Minutes-into-Seconds/README.md

@@ -0,0 +1,31 @@
+# Convert Hours and Minutes into Seconds
+by Matt
+tags: language_fundamentals, math
+
+## Summary
+> Write a function that takes two integers (hours, minutes) and converts them into seconds.
+> Examples
+> convert(1, 3) ➞ 3780
+> convert(2, 0) ➞ 7200
+> convert(0, 0) ➞ 0
+> Notes
+> Don't forget to return the result.
+> If you get stuck on a challenge, find help in the Resources tab.
+> If you're really stuck, unlock solutions in the Solutions tab.
+
+## Instructions
+Write a function that takes two integers (`hours`, `minutes`) and converts them into seconds.
+
+### Examples
+```
+convert(1, 3) ➞ 3780
+
+convert(2, 0) ➞ 7200
+
+convert(0, 0) ➞ 0
+```
+
+### Notes
+- Don't forget to `return` the result.
+- If you get stuck on a challenge, find help in the **Resources** tab.
+- If you're *really* stuck, unlock solutions in the **Solutions** tab.

+ 8 - 0
Convert-Hours-and-Minutes-into-Seconds/code.cpp

@@ -0,0 +1,8 @@
+/*  Write a function that takes two integers 
+ *  (hours, minutes) and converts them into seconds.
+ */
+int convert(int hours, int minutes) {
+	int convert = hours*60*60 + minutes*60;
+	//  hey look its recursive
+	return convert;
+}

+ 6 - 0
Convert-Hours-and-Minutes-into-Seconds/unitTest.cpp

@@ -0,0 +1,6 @@
+Describe(tests)
+{
+  It(test1){Assert::That(convert(1, 0), Equals(3600));}
+	It(test2){Assert::That(convert(1, 3), Equals(3780));}
+	It(test3){Assert::That(convert(0, 30), Equals(1800));}
+};

+ 29 - 0
Convert-Hours-into-Seconds/README.md

@@ -0,0 +1,29 @@
+# Convert Hours into Seconds
+by Matt
+tags: math, numbers, language_fundamentals
+
+## Summary
+> Write a function that converts hours into seconds.
+> Examples
+> howManySeconds(2) ➞ 7200
+> howManySeconds(10) ➞ 36000
+> howManySeconds(24) ➞ 86400
+> Notes
+> 60 seconds in a minute, 60 minutes in an hour
+> Don't forget to return your answer.
+
+## Instructions
+Write a function that converts `hours` into seconds.
+
+### Examples
+```
+howManySeconds(2) ➞ 7200
+
+howManySeconds(10) ➞ 36000
+
+howManySeconds(24) ➞ 86400
+```
+
+### Notes
+- 60 seconds in a minute, 60 minutes in an hour
+- Don't forget to `return` your answer.

+ 3 - 0
Convert-Hours-into-Seconds/code.cpp

@@ -0,0 +1,3 @@
+int howManySeconds(int hours) {
+	return hours * 60 * 60;
+}

+ 7 - 0
Convert-Hours-into-Seconds/unitTest.cpp

@@ -0,0 +1,7 @@
+Describe(basic_tests)
+{
+  It(test1){Assert::That(howManySeconds(2), Equals(7200));}
+	It(test2){Assert::That(howManySeconds(10), Equals(36000));}
+	It(test3){Assert::That(howManySeconds(24), Equals(86400));}
+	It(test4){Assert::That(howManySeconds(36), Equals(129600));}
+};

+ 31 - 0
Convert-Minutes-into-Seconds/README.md

@@ -0,0 +1,31 @@
+# Convert Minutes into Seconds
+by Matt
+tags: language_fundamentals, math
+
+## Summary
+> Write a function that takes an integer minutes and converts it to seconds.
+> Examples
+> convert(5) ➞ 300
+> convert(3) ➞ 180
+> convert(2) ➞ 120
+> Notes
+> Don't forget to return the result.
+> If you get stuck on a challenge, find help in the Resources tab.
+> If you're really stuck, unlock solutions in the Solutions tab.
+
+## Instructions
+Write a function that takes an integer `minutes` and converts it to seconds.
+
+### Examples
+```
+convert(5) ➞ 300
+
+convert(3) ➞ 180
+
+convert(2) ➞ 120
+```
+
+### Notes
+- Don't forget to `return` the result.
+- If you get stuck on a challenge, find help in the **Resources** tab.
+- If you're *really* stuck, unlock solutions in the **Solutions** tab.

+ 3 - 0
Convert-Minutes-into-Seconds/code.cpp

@@ -0,0 +1,3 @@
+int convert(int minutes) {
+	return minutes*60;
+}

+ 7 - 0
Convert-Minutes-into-Seconds/unitTest.cpp

@@ -0,0 +1,7 @@
+Describe(tests)
+{
+  It(test1){Assert::That(convert(6), Equals(360));}
+	It(test2){Assert::That(convert(4), Equals(240));}
+	It(test3){Assert::That(convert(8), Equals(480));}
+	It(test4){Assert::That(convert(60), Equals(3600));}
+};

+ 51 - 0
Convert-Number-to-Corresponding-Month-Name/README.md

@@ -0,0 +1,51 @@
+# Convert Number to Corresponding Month Name
+by Helen Yu
+tags: arrays, dates, conditions, formatting
+
+## Summary
+> Create a function that takes a number (from 1 to 12) and returns its corresponding month name as a string. For example, if you're given 3 as input, your function should return "March", because March is the 3rd month.
+> Number | Month Name
+> --- | ---
+> 1 | January
+> 2 | February
+> 3 | March
+> 4 | April
+> 5 | May
+> 6 | June
+> 7 | July
+> 8 | August
+> 9 | September
+> 10 | October
+> 11 |
+
+## Instructions
+Create a function that takes a number (from 1 to 12) and returns its corresponding month name as a string. For example, if you're given `3` as input, your function should return `"March"`, because March is the 3rd month.
+
+Number | Month Name
+--- | ---
+1 | January
+2 | February
+3 | March
+4 | April
+5 | May
+6 | June
+7 | July
+8 | August
+9 | September
+10 | October
+11 | November
+12 | December
+
+### Examples
+```
+monthName(3) ➞ "March"
+
+monthName(12) ➞ "December"
+
+monthName(6) ➞ "June"
+```
+
+### Notes
+- You can expect only integers ranging from 1 to 12 as test input.
+- If you get stuck on a challenge, find help in the **Resources** tab.
+- If you're *really* stuck, unlock solutions in the **Solutions** tab.

+ 22 - 0
Convert-Number-to-Corresponding-Month-Name/code.cpp

@@ -0,0 +1,22 @@
+/*  Create a function that takes a number (from 1 to 12) and returns
+ *  its corresponding month name as a string. For example,
+ *  if you're given 3 as input, your function should return "March",
+ *  because March is the 3rd month.
+ */
+std::string monthName(int num) {
+	switch (num){
+	case 1 : return "January"; break;
+	case 2 : return "February"; break;
+	case 3 : return "March"; break;
+	case 4 : return "April"; break;
+	case 5 : return "May"; break;
+	case 6 : return "June"; break;
+	case 7 : return "July"; break;
+	case 8 : return "August"; break;
+	case 9 : return "September"; break;
+	case 10 : return "October"; break;
+	case 11 : return "November"; break;
+	case 12 : return "December"; break;
+	}
+	return 0;
+}

+ 15 - 0
Convert-Number-to-Corresponding-Month-Name/unitTest.cpp

@@ -0,0 +1,15 @@
+Describe(convert_month_tests)
+{
+	It(test1){Assert::That(monthName(1), Equals("January"));}
+	It(test2){Assert::That(monthName(2), Equals("February"));}
+	It(test3){Assert::That(monthName(3), Equals("March"));}
+	It(test4){Assert::That(monthName(4), Equals("April"));}
+	It(test5){Assert::That(monthName(5), Equals("May"));}
+	It(test6){Assert::That(monthName(6), Equals("June"));}
+	It(test7){Assert::That(monthName(7), Equals("July"));}
+	It(test8){Assert::That(monthName(8), Equals("August"));}
+	It(test9){Assert::That(monthName(9), Equals("September"));}
+	It(test10){Assert::That(monthName(10), Equals("October"));}
+	It(test11){Assert::That(monthName(11), Equals("November"));}
+	It(test12){Assert::That(monthName(12), Equals("December"));}
+};

+ 33 - 0
Convert-Number-to-String-of-Dashes/README.md

@@ -0,0 +1,33 @@
+# Convert Number to String of Dashes
+by Helen Yu
+tags: loops, strings, numbers
+
+## Summary
+> Create a function that takes a number (from 1 - 60) and returns a corresponding string of hyphens.
+> Examples
+> Go(1) ➞ "-"
+> Go(5) ➞ "-----"
+> Go(3) ➞ "---"
+> Notes
+> You will be provided integers ranging from 1 to 60.
+> Don't forget to return your result as a string.
+> If you get stuck on a challenge, find help in the Resources tab.
+> If you're really stuck, unlock soluti
+
+## Instructions
+Create a function that takes a number (from 1 - 60) and returns a corresponding `string` of hyphens.
+
+### Examples
+```
+Go(1) ➞ "-"
+
+Go(5) ➞ "-----"
+
+Go(3) ➞ "---"
+```
+
+### Notes
+- You will be provided integers ranging from 1 to 60.
+- Don't forget to return your result as a `string`.
+- If you get stuck on a challenge, find help in the **Resources** tab.
+- If you're *really* stuck, unlock solutions in the **Solutions** tab.

+ 11 - 0
Convert-Number-to-String-of-Dashes/code.cpp

@@ -0,0 +1,11 @@
+/*  Create a function that takes a number (from 1 - 60) 
+ *  and returns a corresponding string of hyphens.
+ */
+
+std::string Go(int num) {
+	std::string n = "";
+	for (int a=0;a<num; a++){
+		n = n + '-';
+	}
+	return  n ;
+}

+ 9 - 0
Convert-Number-to-String-of-Dashes/unitTest.cpp

@@ -0,0 +1,9 @@
+Describe(repeating_dashes)
+{
+	It(test1){Assert::That(Go(1), Equals("-"));}
+	It(test2){Assert::That(Go(2), Equals("--"));}
+	It(test3){Assert::That(Go(3), Equals("---"));}
+	It(test4){Assert::That(Go(4), Equals("----"));}
+	It(test5){Assert::That(Go(5), Equals("-----"));}
+	It(test6){Assert::That(Go(6), Equals("------"));}
+};

+ 29 - 0
Correct-the-Mistakes/README.md

@@ -0,0 +1,29 @@
+# Correct the Mistakes
+by CppPythonDude
+tags: bugs, language_fundamentals
+
+## Summary
+> Fix the code in the code tab to pass this challenge (only syntax errors). Look at the examples below to get an idea of what the function should do.
+> Examples
+> squared(5) ➞ 25
+> squared(9) ➞ 81
+> squared(100) ➞ 10000
+> Notes
+> READ EVERY WORD CAREFULLY, CHARACTER BY CHARACTER!
+> Don't overthink this challenge; it's not supposed to be hard.
+
+## Instructions
+Fix the code in the code tab to pass this challenge (only syntax errors). Look at the examples below to get an idea of what the function should do.
+
+### Examples
+```
+squared(5) ➞ 25
+
+squared(9) ➞ 81
+
+squared(100) ➞ 10000
+```
+
+### Notes
+- **READ EVERY WORD CAREFULLY, CHARACTER BY CHARACTER!**
+- Don't overthink this challenge; it's not supposed to be hard.

+ 9 - 0
Correct-the-Mistakes/code.cpp

@@ -0,0 +1,9 @@
+/*  Fix the code in code tab to pass this challenge (only syntax errors). 
+ *	Look at the examples below to get an idea of 
+ *  what the function should do.
+ */
+
+//  SQUAED spelling mistake is not a syntax error~! N008
+int squared(int a) {
+	return a*a;
+}

+ 10 - 0
Correct-the-Mistakes/unitTest.cpp

@@ -0,0 +1,10 @@
+Describe(basic_tests) {
+	It(test1){Assert::That(squared(10), Equals(100));}
+	It(test2){Assert::That(squared(69), Equals(4761));}
+	It(test3){Assert::That(squared(666), Equals(443556));}
+	It(test4){Assert::That(squared(-21), Equals(441));}
+	It(test5){Assert::That(squared(21), Equals(441));}
+};
+
+// This proves that the square root of
+// a negative number isn't possible!

+ 42 - 0
Count-Letters-in-a-Word-Search/README.md

@@ -0,0 +1,42 @@
+# Count Letters in a Word Search
+by Helen Yu
+tags: arrays, higher_order_functions
+
+## Summary
+> Create a function that counts the number of times a particular letter shows up in the word search.
+> Examples
+> letterCounter([
+>   ["D", "E", "Y", "H", "A", "D"],
+>   ["C", "B", "Z", "Y", "J", "K"],
+>   ["D", "B", "C", "A", "M", "N"],
+>   ["F", "G", "G", "R", "S", "R"],
+>   ["V", "X", "H", "A", "S", "S"]
+> ], "D") ➞ 3
+> // "D" shows up 3 times: twice in the first row, once i
+
+## Instructions
+Create a function that counts the number of times a particular letter shows up in the word search.
+
+### Examples
+```
+letterCounter([
+  ["D", "E", "Y", "H", "A", "D"],
+  ["C", "B", "Z", "Y", "J", "K"],
+  ["D", "B", "C", "A", "M", "N"],
+  ["F", "G", "G", "R", "S", "R"],
+  ["V", "X", "H", "A", "S", "S"]
+], "D") ➞ 3
+
+// "D" shows up 3 times: twice in the first row, once in the third row.
+
+letterCounter([
+  ["D", "E", "Y", "H", "A", "D"],
+  ["C", "B", "Z", "Y", "J", "K"],
+  ["D", "B", "C", "A", "M", "N"],
+  ["F", "G", "G", "R", "S", "R"],
+  ["V", "X", "H", "A", "S", "S"]
+], "H") ➞ 2
+```
+
+### Notes
+You will always be given an array with five sub-arrays.

+ 13 - 0
Count-Letters-in-a-Word-Search/code.cpp

@@ -0,0 +1,13 @@
+/*  Create a function that counts the number of times a 
+ *  particular letter shows up in the word search.
+ */
+using namespace std;
+int letterCounter(vector<vector<char>> arr, char c) {
+	int mycount = 0;
+	// loop over the array to get the count of each character array
+	for (int i=0;arr.size()>i;i++){
+		// add the count of "c" to count
+		mycount += count(arr[i].begin(),arr[i].end(), c);
+	}
+	return mycount;
+}

+ 62 - 0
Count-Letters-in-a-Word-Search/unitTest.cpp

@@ -0,0 +1,62 @@
+Describe(word_search_tests)
+{
+	It(test1) {
+		Assert::That(letterCounter({
+		{'D', 'E', 'Y', 'H', 'A', 'D'},
+		{'C', 'B', 'Z', 'Y', 'J', 'K'},
+		{'D', 'B', 'C', 'A', 'M', 'N'},
+		{'F', 'G', 'G', 'R', 'S', 'R'},
+		{'V', 'X', 'H', 'A', 'S', 'S'}
+		}, 'D'), Equals(3));
+	}
+		
+	It(test2) {
+	Assert::That(letterCounter({
+		{'D', 'E', 'Y', 'H', 'A', 'D'},
+		{'C', 'B', 'Z', 'Y', 'J', 'K'},
+		{'D', 'B', 'C', 'A', 'M', 'N'},
+		{'F', 'G', 'G', 'R', 'S', 'R'},
+		{'V', 'X', 'H', 'A', 'S', 'S'}
+		}, 'H'), Equals(2));
+	}
+		
+	It(test3) {
+		Assert::That(letterCounter({
+		{'D', 'E', 'Y', 'H', 'A', 'D'},
+		{'C', 'B', 'Z', 'Y', 'J', 'K'},
+		{'D', 'B', 'C', 'A', 'M', 'N'},
+		{'F', 'G', 'G', 'R', 'S', 'R'},
+		{'V', 'X', 'H', 'A', 'S', 'S'}
+		}, 'Z'), Equals(1));
+	}
+
+	It(test4) {
+		Assert::That(letterCounter({
+		{'D', 'E', 'Y', 'H', 'A', 'D'},
+		{'C', 'B', 'Z', 'Y', 'J', 'K'},
+		{'D', 'B', 'C', 'A', 'M', 'N'},
+		{'F', 'G', 'G', 'R', 'S', 'R'},
+		{'V', 'X', 'H', 'A', 'S', 'S'}
+		}, 'R'), Equals(2));
+	}
+		
+	It(test5) {
+		Assert::That(letterCounter({
+		{'D', 'E', 'Y', 'H', 'A', 'D'},
+		{'C', 'B', 'Z', 'Y', 'J', 'K'},
+		{'D', 'B', 'C', 'A', 'M', 'N'},
+		{'F', 'G', 'G', 'R', 'S', 'R'},
+		{'V', 'X', 'H', 'A', 'S', 'S'}
+		}, 'X'), Equals(1));
+	}
+		
+	It(test6) {
+		Assert::That(letterCounter({
+		{'D', 'E', 'Y', 'H', 'A', 'D'},
+		{'C', 'B', 'Z', 'Y', 'J', 'K'},
+		{'D', 'B', 'C', 'A', 'M', 'N'},
+		{'F', 'G', 'G', 'R', 'S', 'R'},
+		{'V', 'X', 'H', 'A', 'S', 'S'}
+		}, 'S'), Equals(3));
+	}
+};

+ 30 - 0
Double-Letters/README.md

@@ -0,0 +1,30 @@
+# Double Letters
+by Helen Yu
+tags: strings, regex, validation
+
+## Summary
+> Create a function that takes a word and returns true if the word has two consecutive identical letters.
+> Examples
+> double_letters("loop") ➞ true
+> double_letters("yummy") ➞ true
+> double_letters("orange") ➞ false
+> double_letters("munchkin") ➞ false
+> Notes
+> N/A
+
+## Instructions
+Create a function that takes a word and returns `true` if the word has two consecutive identical letters.
+
+### Examples
+```
+double_letters("loop") ➞ true
+
+double_letters("yummy") ➞ true
+
+double_letters("orange") ➞ false
+
+double_letters("munchkin") ➞ false
+```
+
+### Notes
+N/A

+ 12 - 0
Double-Letters/code.cpp

@@ -0,0 +1,12 @@
+/*  Create a function that takes a word 
+ ~  and returns true if the word has two consecutive identical letters.
+ */
+bool double_letters(std::string word) {
+	for (int i=0;i<word.size();i++){
+		// get current character of "word", compare with next character
+		if (word[i] == word[i+1]) {
+			return true;
+		}
+	}
+	return false;
+}

+ 15 - 0
Double-Letters/unitTest.cpp

@@ -0,0 +1,15 @@
+Describe(double_letters_test)
+{
+	It(test1){Assert::That(double_letters("loop"), Equals(true)); }
+	It(test2){Assert::That(double_letters("meeting"), Equals(true)); }
+	It(test3){Assert::That(double_letters("yummy"), Equals(true)); }
+	It(test4){Assert::That(double_letters("moo"), Equals(true)); }
+	It(test5){Assert::That(double_letters("toodles"), Equals(true)); }
+	It(test6){Assert::That(double_letters("droop"), Equals(true)); }
+	It(test7){Assert::That(double_letters("loot"), Equals(true)); }
+	It(test8){Assert::That(double_letters("munchkin"), Equals(false)); }
+	It(test9){Assert::That(double_letters("forestry"), Equals(false)); }
+	It(test10){Assert::That(double_letters("raindrops"), Equals(false)); }
+	It(test11){Assert::That(double_letters("gold"), Equals(false)); }
+	It(test12){Assert::That(double_letters("paradise"), Equals(false)); }
+};

+ 28 - 0
Edaaaaabit/README.md

@@ -0,0 +1,28 @@
+# Edaaaaabit
+by Caleb Miller
+tags: formatting, strings, recursion, loops
+
+## Summary
+> Write a function that takes an integer and returns a string with the given number of "a"s in Edabit.
+> Examples
+> howManyTimes(5) ➞ "Edaaaaabit"
+> howManyTimes(0) ➞ "Edbit"
+> howManyTimes(12) ➞ "Edaaaaaaaaaaaabit"
+> Notes
+> You'll only be given integers as test input.
+
+## Instructions
+Write a function that takes an integer and returns a string with the given number of `"a"`s in Edabit.
+
+### Examples
+```
+howManyTimes(5) ➞ "Edaaaaabit"
+
+howManyTimes(0) ➞ "Edbit"
+
+howManyTimes(12) ➞ "Edaaaaaaaaaaaabit"
+```
+
+### Notes
+- The string must start with "Ed" and end with "bit".
+- You'll only be given integers as test input.

+ 8 - 0
Edaaaaabit/code.cpp

@@ -0,0 +1,8 @@
+std::string howManyTimes(int num) {
+	std::string aass = "";
+	// this loop will convert num into as
+	for (int a = 1;a<=num;a++){
+		aass = aass +"a";
+	}
+	return "Ed" + aass + "bit";
+}

+ 8 - 0
Edaaaaabit/unitTest.cpp

@@ -0,0 +1,8 @@
+Describe(how_many_times)
+{
+	It(test1){Assert::That(howManyTimes(5), Equals("Edaaaaabit"));}
+	It(test2){Assert::That(howManyTimes(15), Equals("Edaaaaaaaaaaaaaaabit"));}
+	It(test3){Assert::That(howManyTimes(10), Equals("Edaaaaaaaaaabit"));}
+	It(test4){Assert::That(howManyTimes(23), Equals("Edaaaaaaaaaaaaaaaaaaaaaaabit"));}
+	It(test5){Assert::That(howManyTimes(1), Equals("Edabit"));}
+};

+ 29 - 0
Factorize-a-Number/README.md

@@ -0,0 +1,29 @@
+# Factorize a Number
+by Helen Yu
+tags: math, numbers, control_flow, loops
+
+## Summary
+> Create a function that takes a number as its argument and returns an array of all its factors.
+> Examples
+> factorize(12) ➞ [1, 2, 3, 4, 6, 12]
+> factorize(4) ➞ [1, 2, 4]
+> factorize(17) ➞ [1, 17]
+> Notes
+> The input integer will be positive.
+> A factor is a number that evenly divides into another number without leaving a remainder. The second example is a factor of 12,
+
+## Instructions
+Create a function that takes a number as its argument and returns an array of all its factors.
+
+### Examples
+```
+factorize(12) ➞ [1, 2, 3, 4, 6, 12]
+
+factorize(4) ➞ [1, 2, 4]
+
+factorize(17) ➞ [1, 17]
+```
+
+### Notes
+- The input integer will be positive.
+- A factor is a number that evenly divides into another number without leaving a remainder. The second example is a factor of 12, because 12 / 2 = 6, with remainder 0.

+ 13 - 0
Factorize-a-Number/code.cpp

@@ -0,0 +1,13 @@
+// Create a function that takes a number as its argument and 
+// returns an array of all its factors.
+std::vector<int> factorize(int n) {
+	std::vector<int> results={};
+	for (int a=1;a<=n;a++){
+		// check to see if it is a factor. and then store the factor
+		if (n%a==0) {
+			results.push_back(a);	
+		} 
+		
+	}
+return results;
+}

+ 8 - 0
Factorize-a-Number/unitTest.cpp

@@ -0,0 +1,8 @@
+Describe(factorize_tests)
+{
+	It(test1){Assert::That(factorize(12), Equals(std::vector<int>({1, 2, 3, 4, 6, 12})));}
+	It(test2){Assert::That(factorize(4), Equals(std::vector<int>({1, 2, 4})));}
+	It(test3){Assert::That(factorize(17), Equals(std::vector<int>({1, 17})));}
+	It(test4){Assert::That(factorize(24), Equals(std::vector<int>({1, 2, 3, 4, 6, 8, 12, 24})));}
+	It(test5){Assert::That(factorize(1), Equals(std::vector<int>({1})));}
+};

+ 29 - 0
First-N-Vowels/README.md

@@ -0,0 +1,29 @@
+# First N Vowels
+by Matt
+tags: strings, regex, loops
+
+## Summary
+> Write a function that returns the first n vowels of a string.
+> Examples
+> firstNVowels("sharpening skills", 3) ➞ "aei"
+> firstNVowels("major league", 5) ➞ "aoeau"
+> firstNVowels("hostess", 5) ➞ "invalid"
+> Notes
+> Return "invalid" if the n exceeds the number of vowels in a string.
+> Vowels are: a, e, i, o, u
+
+## Instructions
+Write a function that returns the first `n` vowels of a string.
+
+### Examples
+```
+firstNVowels("sharpening skills", 3) ➞ "aei"
+
+firstNVowels("major league", 5) ➞ "aoeau"
+
+firstNVowels("hostess", 5) ➞ "invalid"
+```
+
+### Notes
+- Return `"invalid"` if the `n` exceeds the number of vowels in a string.
+- Vowels are: _a, e, i, o, u_

+ 20 - 0
First-N-Vowels/code.cpp

@@ -0,0 +1,20 @@
+/*  Write a function that returns the first n vowels of a string.
+ *  Return "invalid" if the n exceeds the number of vowels in 
+ *  a string. Vowels are: a, e, i, o, u
+ */
+bool isVowel(char c){
+	c = tolower(c);
+	return (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u');
+}
+std::string firstNVowels(std::string str, int n) {
+	//  all vowels from string are stored here
+	std::string vowels = "";
+	//  check for vowels in string, if a vowel is found add to vowels
+	for(int i = 0;i<str.size();i++){
+		if(isVowel(str[i])){
+			vowels.push_back(str[i]);
+		}
+	}
+	if(n <= vowels.size()){return vowels.substr(0,n);}
+	 else return "invalid";
+}

+ 9 - 0
First-N-Vowels/unitTest.cpp

@@ -0,0 +1,9 @@
+Describe(tests)
+{
+  It(test1){Assert::That(firstNVowels("sharpening skills", 3), Equals("aei"));}
+	It(test2){Assert::That(firstNVowels("major league", 5), Equals("aoeau"));}
+	It(test3){Assert::That(firstNVowels("crabby patty", 2), Equals("aa"));}
+	It(test4){Assert::That(firstNVowels("shrimp", 1), Equals("i"));}
+	It(test5){Assert::That(firstNVowels("shrimpy", 2), Equals("invalid"));}
+	It(test6){Assert::That(firstNVowels("hostess", 5), Equals("invalid"));}
+};

+ 28 - 0
Flip-the-Boolean/README.md

@@ -0,0 +1,28 @@
+# Flip the Boolean
+by Helen Yu
+tags: logic, conditions, language_fundamentals
+
+## Summary
+> Create a function that reverses a boolean value.
+> Examples
+> reverse(true) ➞ false
+> reverse(false) ➞ true
+> Notes
+> Don't forget to return the result.
+> If you get stuck on a challenge, find help in the Resources tab.
+> If you're really stuck, unlock solutions in the Solutions tab.
+
+## Instructions
+Create a function that reverses a `boolean` value.
+
+### Examples
+```
+reverse(true) ➞ false
+
+reverse(false) ➞ true
+```
+
+### Notes
+- Don't forget to `return` the result.
+- If you get stuck on a challenge, find help in the **Resources** tab.
+- If you're *really* stuck, unlock solutions in the **Solutions** tab.

+ 8 - 0
Flip-the-Boolean/code.cpp

@@ -0,0 +1,8 @@
+bool reverse(bool boolean) {
+	if (boolean == true){
+		return false;
+	}
+	else if (boolean == false){
+		return true;
+	}
+}

+ 5 - 0
Flip-the-Boolean/unitTest.cpp

@@ -0,0 +1,5 @@
+Describe(flip_boolean_tests)
+{
+	It(test1){Assert::That(reverse(false), Equals(true));}
+	It(test2){Assert::That(reverse(true), Equals(false));}
+};

+ 26 - 0
Flip-the-int-Boolean/README.md

@@ -0,0 +1,26 @@
+# Flip the int Boolean
+by CppPythonDude
+tags: logic, language_fundamentals
+
+## Summary
+> An int boolean is same as a normal boolean, just 1 = true and 0 = false.
+> Make a function that returns an int boolean opposite of an int boolean given (flip the int boolean).
+> Examples
+> flipIntBool(1) ➞ 0
+> flipIntBool(0) ➞ 1
+> Notes
+> N/A
+
+## Instructions
+An int boolean is same as a normal boolean, just 1 = `true` and 0 = `false`.
+Make a function that returns an int boolean opposite of an int boolean given (flip the int boolean).
+
+### Examples
+```
+flipIntBool(1) ➞ 0
+
+flipIntBool(0) ➞ 1
+```
+
+### Notes
+N/A

+ 8 - 0
Flip-the-int-Boolean/code.cpp

@@ -0,0 +1,8 @@
+/*An int boolean is same as a normal boolean, just 1 = true and 0 = false. 
+Make a function that returns an int boolean opposite of an 
+int boolean given (flip the int boolean).*/
+
+int flipIntBool(int baseIntBoolean) {
+	// haha I DIDNT CODE!
+	return !baseIntBoolean;
+}

+ 4 - 0
Flip-the-int-Boolean/unitTest.cpp

@@ -0,0 +1,4 @@
+Describe (int_bool){
+	It(test1){Assert::That(flipIntBool(1), Equals(0));}
+	It(test2){Assert::That(flipIntBool(0), Equals(1));}
+};

+ 27 - 0
Generate-a-Countdown-of-Numbers-in-an-Array/README.md

@@ -0,0 +1,27 @@
+# Generate a Countdown of Numbers in an Array
+by Helen Yu
+tags: arrays, loops
+
+## Summary
+> Create a function that takes a number as an argument and returns an array of numbers counting down from this number to zero.
+> Examples
+> countdown(5) ➞ [5, 4, 3, 2, 1, 0]
+> countdown(1) ➞ [1, 0]
+> countdown(0) ➞ [0]
+> Notes
+> The argument will always be greater than or equal to zero.
+
+## Instructions
+Create a function that takes a number as an argument and returns an array of numbers counting down from this number to zero.
+
+### Examples
+```
+countdown(5) ➞ [5, 4, 3, 2, 1, 0]
+
+countdown(1) ➞ [1, 0]
+
+countdown(0) ➞ [0]
+```
+
+### Notes
+The argument will always be greater than or equal to zero.

Some files were not shown because too many files changed in this diff