Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added jasminedemo/package.json
Empty file.
9 changes: 9 additions & 0 deletions src/easy/3or5/plain.md
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
# Plain English Solution
If you list all the natural numbers below 10 that are multiples of 3 or 5, you'll get 3, 5, 6 and 9. The sum of these multiples is 23.

Find the sum of all the multiples of 3 or 5 below 1000.

1) create a list from 1 - 1000
2) Go through each number so we are able to check if they are a multiple of 3 and 5.
3) When a number is a multiple of 3 and 5, save these values
4) create a sum of these values
5) return the total value
5 changes: 5 additions & 0 deletions src/easy/3or5/pseudo.md
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
# Pseudo Code Solution
1) create const variable 'find numbers that are multiples of 3 and 5;'
2) create another const variable for loops
3) create a loop where the condition is less that 1,000 and adds one - use the push function (adds elements to the end)
4) Use the modulo % 3 and % 5 in order to get the multiples
5) get the result
13 changes: 13 additions & 0 deletions src/easy/digitCount/plain.md
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
# Plain English Solution
# Digit Count

Given a number, count the number of digits. For example:

```text
318 = 3
92563 = 5
4666 = 4
314890 = 6
```

1) create a list - all numnbers above 0
2) use count formula so any number will count the number of digits
14 changes: 14 additions & 0 deletions src/easy/digitCount/pseudo.md
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@

# Pseudo Code Solution


Given a number, count the number of digits. For example:

```text
318 = 3
92563 = 5
4666 = 4
314890 = 6
```
1) create two const, one to enter any number and two, so the num formula can feed through
2) the second const - use function called count which equals 0
3) use an if statement to return digits
7 changes: 7 additions & 0 deletions src/easy/factorial/plain.md
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
# Plain English Solution
Find the product of all positive integers less than or equal to any given number. This is known as the _factorial_ (denoted by _!_):

`5! = 5 x 4 x 3 x 2 x 1 = 120`

1) create function
2) create a list of numbers above 1 by creating a loop
3) each number entered in the console log, for example, 8, will times all numbers from 1-8 together
9 changes: 9 additions & 0 deletions src/easy/factorial/pseudo.md
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
# Pseudo Code Solution
Find the product of all positive integers less than or equal to any given number. This is known as the _factorial_ (denoted by _!_):

`5! = 5 x 4 x 3 x 2 x 1 = 120`

1) create a function called factorial, enter a paramete
2) create a for loop, which starts from 1, and allocate a condition to find numbers above 1
3) assign const with operation of multiplication
4) create a return, returning the const
5) console.log
4 changes: 4 additions & 0 deletions src/easy/makeSentence/plain.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# Plain English Solution
Given a sentence, capitalise the first letter and add a full stop to the end. However, if the sentence already ends with some form of puncutation, leave it as is.

1) create an array - allocate a sentence inside the array
2) use the unshift function that capitalises the first letter
1 change: 1 addition & 0 deletions src/easy/makeSentence/problem.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Make Sentence

Given a sentence, capitalise the first letter and add a full stop to the end. However, if the sentence already ends with some form of puncutation, leave it as is.

1 change: 1 addition & 0 deletions src/easy/makeSentence/pseudo.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# Pseudo Code Solution
Given a sentence, capitalise the first letter and add a full stop to the end. However, if the sentence already ends with some form of puncutation, leave it as is.
8 changes: 8 additions & 0 deletions src/easy/random/plain.md
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
# Plain English Solution
Create your own method for generating a random number between two other numbers.

It is common to use _time_ as a means of generating a random number, but there are other ways, too - can you find one?


1) choose two random numbers
2) create a function
3) create a return that generates the random number
7 changes: 7 additions & 0 deletions src/easy/random/pseudo.md
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
# Pseudo Code Solution
Create your own method for generating a random number between two other numbers.

It is common to use _time_ as a means of generating a random number, but there are other ways, too - can you find one?

1) choose two random numbers
2) create a function
3) create a return that generates the random number
16 changes: 16 additions & 0 deletions src/easy/random/solution.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// //# Pseudo Code Solution
// Create your own method for generating a random number between two other numbers.

// It is common to use _time_ as a means of generating a random number, but there are other ways, too - can you find one?

// 1) choose two random numbers
// 2) create a function
// 3) create a return that generates the random number

let num = 0
function randomNum (){

return num = Math.floor(Math.random()*41);
}

console.log(randomNum())
8 changes: 8 additions & 0 deletions src/easy/sum/plain.md
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
# Plain English Solution
Sum the numbers from 1 to 100.

For example, to sum the numbers from 1 to 5, you'd have:

1 + 2 + 3 + 4 + 5 = 15

1) create a list from 1 to 100
2) sum up the numbers from 1 to 100
10 changes: 10 additions & 0 deletions src/easy/sum/pseudo.md
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
# Pseudo Code Solution
Sum the numbers from 1 to 100.

For example, to sum the numbers from 1 to 5, you'd have:

1 + 2 + 3 + 4 + 5 = 15


1) create a const variable 'numbers from 1-100'
2) create a loop, where the condition is less than 100 and adds 1 each time
3) create a return
16 changes: 16 additions & 0 deletions src/easy/sum/solution.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// 1) create a const variable 'numbers from 1-100'
// 2) create a loop, where the condition is less than 100 and adds 1 each time
// 3) create a return

let sumOfNums = 0

function num () {


for (let i = 1; i <= 100; i++) {
sumOfNums += i
}

return sumOfNums
}
console.log(num())
27 changes: 27 additions & 0 deletions src/medium/pigLatin/solution.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// # Pig Latin

// Translate some text to Pig Latin and vice versa.

// English is translated to Pig Latin by taking the first letter of every word, moving it to the end of the word and adding ‘ay’. Therefore, "The quick brown fox" becomes "Hetay uickqay rownbay oxfay".

// var arr = [1, 2, 6, 3, 4, 5];
// arr.push(arr.splice(2,4), 1)[0]);
// console.log(arr); // [1, 2, 3, 4, 5, 6]

// "hello world"
// "ellohay orldway"

//Step 1 "hello world"
//split > [ "hello", "world"
// Step 2 Hello: H shifted then pushed to the end
//step 3 push AY to the end of the ELLOH

var a = ["h","ello"]

a.push(a.shift());
a.push('ay');
console.log(a); // [1,2,3,4,5]