Skip to content

JWING| FIX: Correct calculate method and ensure all tests pass #281

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
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
7 changes: 7 additions & 0 deletions lesson_05/jeremiahwing/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## User Stories For An Independent Artist, Frequent Traveler, and Multitasker

- As an independent artist i want to upload my vocal recording, so that I van recieve beat suggestions that match the vibe of my song

- As a frequent traveler, I want to stream my favorite shows and music through my cars sceen, so that I can stay entertained during local drives.

- As a multitasker/deveoper, I want to project my Mac's screen in full-screen mode onto a wall, so that I can enjoy a cinematic experience in any setting.
2 changes: 1 addition & 1 deletion lesson_06/expression/.env.test
Original file line number Diff line number Diff line change
@@ -1 +1 @@
HW_VERSION=your assigned version here
HW_VERSION=D
20 changes: 17 additions & 3 deletions lesson_06/expression/src/expression_calculator.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
export class ExpressionCalculator {
/** Returns a calculation involving a, b, c, d, and e */
calculate(a: number, b: number, c: number, d: number, e: number): number {
// Implement your code here to return the correct value.
return 0;
const sum = this.add(c, d);
const power = this.pow(sum, e);
const product = this.multiply(a, b);
return this.divide(product, power);
}

pow(base: number, exponent: number): number {
return Math.pow(base, exponent);
}
}

add(a: number, b: number): number {
return a + b;
}

multiply(a: number, b: number): number {
return a * b;
}

divide(a: number, b: number): number {
return a / b;
}
}
20 changes: 10 additions & 10 deletions lesson_06/quiz/src/lesson5.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class Lesson5 {
[AnswerChoice.C, "To insert an image"],
[AnswerChoice.D, "To create a paragraph"],
]),
AnswerChoice.UNANSWERED,
AnswerChoice.B,
);
}

Expand All @@ -52,7 +52,7 @@ export class Lesson5 {
[AnswerChoice.C, "alt"],
[AnswerChoice.D, "href"],
]),
AnswerChoice.UNANSWERED,
AnswerChoice.C,
);
}

Expand All @@ -66,7 +66,7 @@ export class Lesson5 {
[AnswerChoice.C, "<div>"],
[AnswerChoice.D, "<link>"],
]),
AnswerChoice.UNANSWERED,
AnswerChoice.B,
);
}

Expand All @@ -80,7 +80,7 @@ export class Lesson5 {
[AnswerChoice.C, "<span>"],
[AnswerChoice.D, "<br>"],
]),
AnswerChoice.UNANSWERED,
AnswerChoice.B,
);
}

Expand All @@ -94,7 +94,7 @@ export class Lesson5 {
[AnswerChoice.C, "Computer Style Sheets"],
[AnswerChoice.D, "Cascading System Sheets"],
]),
AnswerChoice.UNANSWERED,
AnswerChoice.B,
);
}

Expand All @@ -108,7 +108,7 @@ export class Lesson5 {
[AnswerChoice.C, "text-color"],
[AnswerChoice.D, "background-color"],
]),
AnswerChoice.UNANSWERED,
AnswerChoice.B,
);
}

Expand All @@ -122,7 +122,7 @@ export class Lesson5 {
[AnswerChoice.C, "/* this is a comment */"],
[AnswerChoice.D, "<!-- this is a comment -->"],
]),
AnswerChoice.UNANSWERED,
AnswerChoice.B,
);
}

Expand All @@ -136,7 +136,7 @@ export class Lesson5 {
[AnswerChoice.C, "text-size"],
[AnswerChoice.D, "text-style"],
]),
AnswerChoice.UNANSWERED,
AnswerChoice.B,
);
}

Expand All @@ -150,7 +150,7 @@ export class Lesson5 {
[AnswerChoice.C, "inline-block"],
[AnswerChoice.D, "none"],
]),
AnswerChoice.UNANSWERED,
AnswerChoice.B,
);
}

Expand All @@ -164,7 +164,7 @@ export class Lesson5 {
[AnswerChoice.C, "<stylesheet link='styles.css'>"],
[AnswerChoice.D, "<css href='styles.css'>"],
]),
AnswerChoice.UNANSWERED,
AnswerChoice.C,
);
}
}
Expand Down
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading