I need help understanding why my output is showing shapes and different numbers. I already inputed npm into my command terminal to run prompt correctly. This is for JavaScript.
I need help understanding why my output is showing shapes and different numbers. I already inputed npm into my command terminal to run prompt correctly. This is for JavaScript.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
I need help understanding why my output is showing shapes and different numbers. I already inputed npm into my command terminal to run prompt correctly. This is for JavaScript.
![6
7
8
9
0
1
2
3
4
15
16
17
18
19
20
21
22
23
const prompt = require ("prompt-sync") ({sigint: true));
let triangleSidel = prompt ("Enter the length of the first side of the triangle:
console.log (triangleSidel);
let triangleSide2 = prompt ("Enter the length of the second side of the triangle:
console.log (triangleSide2);
let triangleSide3 = prompt ("Enter the length of the third side of the triangle:
console.log (triangleSide 3);
if (triangleSidel> triangleSide2 + triangleSide3 ||
triangleSide2 > triangleSidel + triangleSide3 ||
triangleSide3 > triangleSidel + triangleSide2) {
console.log("No, you can not make a triangle.");
else {
console.log("Yes, you can make a triangle.");
}
AppExec Console
CD: C:\Users\bcook\cop2801\assignment_2
ANT](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F276284ce-ffcc-4286-8c29-141f21764224%2F26213b9e-2f43-4f98-bc94-cfffe7ebc239%2Fdebw7pr_processed.jpeg&w=3840&q=75)
Transcribed Image Text:6
7
8
9
0
1
2
3
4
15
16
17
18
19
20
21
22
23
const prompt = require ("prompt-sync") ({sigint: true));
let triangleSidel = prompt ("Enter the length of the first side of the triangle:
console.log (triangleSidel);
let triangleSide2 = prompt ("Enter the length of the second side of the triangle:
console.log (triangleSide2);
let triangleSide3 = prompt ("Enter the length of the third side of the triangle:
console.log (triangleSide 3);
if (triangleSidel> triangleSide2 + triangleSide3 ||
triangleSide2 > triangleSidel + triangleSide3 ||
triangleSide3 > triangleSidel + triangleSide2) {
console.log("No, you can not make a triangle.");
else {
console.log("Yes, you can make a triangle.");
}
AppExec Console
CD: C:\Users\bcook\cop2801\assignment_2
ANT
![Process started (PID=21032) >>
Enter the length of the first side of the triangle: 12
[s0[2KO[0GEnter
32
the length of the first side of the triangle: 120[55GO[55G
[s0[2KO[0GEnter
[s0[2KO[OGEnter
[63G[63G
JavaScript file
the length of the first side of the triangle: 12320[57GO[57666666
the length of the first side of the triangle: 12326660[60G[60GO[SO
80°F
Mostly sunny](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F276284ce-ffcc-4286-8c29-141f21764224%2F26213b9e-2f43-4f98-bc94-cfffe7ebc239%2Fdd2s1ai_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Process started (PID=21032) >>
Enter the length of the first side of the triangle: 12
[s0[2KO[0GEnter
32
the length of the first side of the triangle: 120[55GO[55G
[s0[2KO[0GEnter
[s0[2KO[OGEnter
[63G[63G
JavaScript file
the length of the first side of the triangle: 12320[57GO[57666666
the length of the first side of the triangle: 12326660[60G[60GO[SO
80°F
Mostly sunny
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question
I have tried to run the program without that line with const prompt = "..." but it says prompt is not defined. I also already installed "npm install prompt sync" and i still get the same error code everytime. I found the prompt line online, I don't know where the user got const prompt = require("prompt-sync")({sigint: true});
Solution
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education