Skip to content

Commit 9f91a4f

Browse files
committed
commit following debugging with alex
1 parent d801698 commit 9f91a4f

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

Shuttles/class-2-studio.js

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
const date = "Monday 2019-03-18";
2+
const time = "10:05:34 AM";
3+
const astronautCount = 7;
4+
const astronautStatus = "ready";
5+
const averageAstronautMassKg = 80.7;
6+
const crewMassKg = astronautCount * averageAstronautMassKg;
7+
const fuelMassKg = 760000;
8+
const shuttleMassKg = 74842.31;
9+
const totalMassKg = crewMassKg + fuelMassKg +shuttleMassKg;
10+
const maximumMassLimit = 850000;
11+
const fuelTempCelcius = -225;
12+
const minimumFuelTemp = -300;
13+
const maximumFuelTemp = -150;
14+
const fuelLevel = 100 + "%";
15+
const weatherStatus = "clear";
16+
const preparedForLiftOff = true;
17+
18+
// if (astronautCount <= 7 ){
19+
// console.log("astronauts");
20+
// }
21+
22+
// if (astronautStatus === "ready"){
23+
// console.log("astronauts are ready");
24+
// }
25+
26+
// if (totalMassKg < maximumMassLimit){
27+
// console.log("get yo booty up");
28+
// }
29+
30+
// if (fuelTempCelcius >= minimumFuelTemp || fuelTempCelcius <= maximumFuelTemp){
31+
// console.log("fuel temps look good");
32+
// }
33+
// if(fuelLevel === 100 + "%"){
34+
// console.log("enough fuel for the journey!!!");
35+
// }
36+
37+
// if (weatherStatus === "clear"){
38+
// console.log("good weather hooray!")
39+
// }change
40+
41+
42+
if (astronautCount <= 7 && astronautStatus === "ready" && totalMassKg < maximumMassLimit
43+
&&fuelTempCelcius >= minimumFuelTemp || fuelTempCelcius <= maximumFuelTemp && fuelLevel === 100 + "%" &&
44+
weatherStatus === "clear") {
45+
console.log("All systems are a go! Initiating space shuttle launch sequence.")
46+
console.log("Date: " + date)
47+
console.log("Time: " + time)
48+
console.log("Astronaut Count: " + astronautCount)
49+
console.log("Crew Mass: "+ crewMassKg + "kg")
50+
console.log("Fuel Mass: " + fuelMassKg + "kg")
51+
console.log("Shuttle Mass: " + shuttleMassKg + "kg")
52+
console.log("Total Mass: " + totalMassKg + "kg")
53+
console.log("Fuel Temperature: " + fuelTempCelcius + "℃" )
54+
console.log("Weather Status: " + weatherStatus)
55+
console.log("Have a safe trip astronauts!!")
56+
57+
}else {
58+
console.log("Shuttle Failure RIP")
59+
}

0 commit comments

Comments
 (0)