Skip to content

Commit 44284f1

Browse files
Joshua HunterJoshua Hunter
authored andcommitted
<changes>
1 parent 7fa74e1 commit 44284f1

File tree

7 files changed

+92
-6
lines changed

7 files changed

+92
-6
lines changed

.DS_Store

6 KB
Binary file not shown.

colordice.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
let blue = 'singlespeed';
2+
let red = 'citywide';
3+
let pink = 'divided sky';
4+
let yellow = 'athletic';
5+
let purple = 'Lonestar';
6+
let green = 'Mercenary';
7+
8+
const input = required('readline-sync');
9+
let colorRolled = input.question('what color did you roll');
10+
11+
console.log(colorRolled);
12+

data-and-variables/.DS_Store

6 KB
Binary file not shown.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
//const input = require('readline-sync');
2+
let date = 'Monday 2019-03-08';
3+
let time = '10:05:34AM';
4+
let astronautCount = 7;//Number(input.question("How many Astronauts are ready to begin the trainning?"));
5+
let astronautStatus = 'ready';
6+
let averageAstronautMassKg = 80.7;
7+
let crewMassKg = astronautCount * averageAstronautMassKg;
8+
let fuelMassKg = 760000;
9+
let shuttleMassKg = 74842.31;
10+
let totalMassKg = crewMassKg + fuelMassKg + shuttleMassKg;
11+
let fuelTempCelsius = -225;
12+
let fuelLevel = 100;
13+
let weatherStatus = 'clear';
14+
let thirtySevenDashes = "-------------------------------------";
15+
let heckYeah = "YES";
16+
17+
18+
console.log(thirtySevenDashes);
19+
console.log(" > LC04 LAUNCH CHECKLIST");
20+
console.log(thirtySevenDashes);
21+
console.log(date);
22+
console.log(time);
23+
console.log(" ");
24+
console.log(thirtySevenDashes);
25+
console.log(" > ASTRONAUT INFO");
26+
console.log(thirtySevenDashes);
27+
console.log("* count:" + " " + astronautCount);
28+
console.log("* status:" + " " + astronautStatus );
29+
console.log(" ");
30+
console.log(thirtySevenDashes);
31+
console.log(" > FUEL DATA");
32+
console.log(thirtySevenDashes);
33+
console.log("* Fuel temp celsius:" + fuelTempCelsius );
34+
console.log("* Fuel level:" + " " + fuelLevel + "%");
35+
console.log(" ");
36+
console.log(thirtySevenDashes);
37+
console.log("> MASS DATA");
38+
console.log(thirtySevenDashes);
39+
console.log("* Crew mass:" + " " + crewMassKg + " " + "kg");
40+
console.log("* Fuel mass:" + " " + fuelMassKg + " " + "kg");
41+
console.log("* Shuttle mass:" + " " + shuttleMassKg + " " + "kg");
42+
console.log("* Total mass:" + " " + totalMassKg + " " + "kg");
43+
44+
console.log(" ");
45+
console.log(thirtySevenDashes);
46+
console.log("> FLIGHT PLAN");
47+
console.log(thirtySevenDashes);
48+
console.log("* weather:" + " " + weatherStatus);
49+
console.log(" ");
50+
console.log(thirtySevenDashes);
51+
console.log("> OVERALL STATUS");
52+
console.log(thirtySevenDashes);
53+
54+
console.log("* Clear for takeoff:" + " " + heckYeah);
Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,31 @@
11
// Declare and assign the variables below
2-
2+
let nameOfTheSpaceShuttle = 'Determination';
3+
let shuttleSpeedMph = 17500;
4+
let distanceToMarsKm = 225000000;
5+
let distanceToMoonKm = 384400;
6+
let milesPerKm = 0.621;
37
// Use console.log to print the 'typeof' each variable. Print one item per line.
4-
8+
console.log(typeof nameOfTheSpaceShuttle);
9+
console.log(typeof shuttleSpeedMph);
10+
console.log(typeof distanceToMarsKm);
11+
console.log(typeof distanceToMoonKm);
12+
console.log(typeof milesPerKm);
513
// Calculate a space mission below
6-
14+
let milesToMars = distanceToMarsKm * milesPerKm;
15+
let hoursToMars = milesToMars / shuttleSpeedMph;
16+
let daysToMars = hoursToMars / 24;
717
// Print the results of the space mission calculations below
8-
18+
console.log(milesToMars);
19+
console.log(hoursToMars);
20+
console.log(daysToMars);
21+
console.log(nameOfTheSpaceShuttle + " " + "will take" + " " + daysToMars + " " + "days to reach Mars.");
22+
// Stoaked to be on this Space Mission Let's Goooooo!!!!
923
// Calculate a trip to the moon below
10-
11-
// Print the results of the trip to the moon below
24+
let milesToMoon = distanceToMoonKm * milesPerKm;
25+
let hoursToMoon = milesToMoon / shuttleSpeedMph;
26+
let daysToMoon = hoursToMoon / 24;
27+
// Print the results of the trip to the moon below
28+
console.log(milesToMoon);
29+
console.log(hoursToMoon);
30+
console.log(daysToMoon);
31+
console.log(nameOfTheSpaceShuttle + " " + "will take" + " " + daysToMoon + " " + "days to reach Moon.");

how-to-write-code/.DS_Store

6 KB
Binary file not shown.

0 commit comments

Comments
 (0)