-
Notifications
You must be signed in to change notification settings - Fork 75
Final Draft #13
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
base: main
Are you sure you want to change the base?
Final Draft #13
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,80 +1,100 @@ | ||
| // Basic math formulaas | ||
| function addition(num1, num2){ | ||
| return -1; | ||
|
|
||
| function addition(num1, num2) { | ||
| return num1 + num2 | ||
| } | ||
| console.log(addition(5, 7)); | ||
|
|
||
| function subtraction(num1, num2){ | ||
| return -1; | ||
| function subtraction(num1, num2) { | ||
| return num1 - num2 | ||
| } | ||
| console.log(subtraction(7, 5)); | ||
|
|
||
| function multiplication(num1, num2){ | ||
| return -1; | ||
| function multiplication(num1, num2) { | ||
| return num1 * num2 | ||
| } | ||
| console.log(multiplication(5, 7)); | ||
|
|
||
| function division(num1, num2){ | ||
| return -1; | ||
| function division(num1, num2) { | ||
| return num1 / num2 | ||
| } | ||
| console.log(division(6, 3)); | ||
|
|
||
| // Area formulaas | ||
| function areaSquare(side){ | ||
| return -1; | ||
| function areaSquare(side) { | ||
| return side * side | ||
| } | ||
| console.log(areaSquare(7)); | ||
|
|
||
| function areaRectangle(length, width){ | ||
| return -1; | ||
| function areaRectangle(length, width) { | ||
| return length * width | ||
| } | ||
| console.log(areaRectangle(5, 7)); | ||
|
|
||
| function areaParallelogram(base, height){ | ||
| return -1; | ||
| function areaParallelogram(base, height) { | ||
| return base * height | ||
| } | ||
| console.log(areaParallelogram(5, 7)); | ||
|
|
||
| function areaTriangle(base, height){ | ||
| return -1; | ||
| function areaTriangle(base, height) { | ||
| return .5 * base * height | ||
| } | ||
| console.log(areaTriangle(5, 7)); | ||
|
|
||
| function Circle(radius){ | ||
| return -1; | ||
| function Circle(radius) { | ||
| return Math.PI * radius * radius | ||
| } | ||
| console.log(Circle(7)); | ||
|
|
||
| function Sphere(radius){ | ||
| return -1; | ||
| function Sphere(radius) { | ||
| return 4 * Math.PI * radius * radius | ||
| } | ||
| console.log(Sphere(7)); | ||
|
|
||
| // Surface Area formulas | ||
| function surfaceAreaCube(side){ | ||
| return -1; | ||
| function surfaceAreaCube(side) { | ||
| return 6 * side * side | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Its better practice to use |
||
| } | ||
| console.log(surfaceAreaCube(7)); | ||
|
|
||
| function surfaceAreaCylinder(radius, height){ | ||
| return -1; | ||
| function surfaceAreaCylinder(radius, height) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wrong equation (-1) |
||
| return 2 * Math.PI * radius * height | ||
| } | ||
| console.log(surfaceAreaCylinder(5, 7)); | ||
|
|
||
| // Perimeter formulas | ||
| function perimeterSquare(side){ | ||
| return -1; | ||
| function perimeterSquare(side) { | ||
| return 4 * side | ||
| } | ||
| console.log(perimeterSquare(7)); | ||
|
|
||
| function perimeterRectangle(length, height){ | ||
| return -1; | ||
| function perimeterRectangle(length, height) { | ||
| return (2 * length) + (2 * height) | ||
| } | ||
| console.log(perimeterRectangle(5, 7)); | ||
|
|
||
| function perimeterTriangle(side1, side2, side3){ | ||
| return -1; | ||
| function perimeterTriangle(side1, side2, side3) { | ||
| return side1 + side2 + side3 | ||
| } | ||
| console.log(perimeterTriangle(6, 7, 8)); | ||
|
|
||
| function perimeterCircle(diameter){ | ||
| return -1; | ||
| function perimeterCircle(diameter) { | ||
| return Math.PI * diameter | ||
| } | ||
| console.log(perimeterCircle(7)); | ||
|
|
||
| // Volume formulas | ||
| function volumeCube(side){ | ||
| return -1; | ||
| function volumeCube(side) { | ||
| return side * side * side | ||
| } | ||
| console.log(volumeCube(7)); | ||
|
|
||
| function volumeRectangular(length, width, height){ | ||
| return -1; | ||
| function volumeRectangular(length, width, height) { | ||
| return length * width * height | ||
| } | ||
| console.log(volumeRectangular(6, 7, 8)); | ||
|
|
||
| function volumeCylinder(radius, height){ | ||
| return -1; | ||
| function volumeCylinder(radius, height) { | ||
| return Math.PI * radius * radius * height | ||
| } | ||
| console.log(volumeCylinder(5, 7)); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 98% Great work! |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should remove
console.log()statements after you finished (-1)