Skip to content

Commit 857df83

Browse files
committed
added shuttle checklist
1 parent 89dcfea commit 857df83

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

booleans-and-conditionals/studio/data-variables-conditionals.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,42 @@
1313
// add logic below to verify the weather status is clear
1414

1515
// Verify shuttle launch can proceed based on above conditions
16+
17+
let date = "Monday 2019-03-18";
18+
let time = "10:05:34 AM";
19+
let astronautCount = 7 ;
20+
let astronautStatus = "ready";
21+
let averageAstronautMassKg = 80.7 ;
22+
let crewMassKg = astronautCount * averageAstronautMassKg ;
23+
let fuelMassKg = 760000 ;
24+
let shuttleMassKg = 74842.31 ;
25+
let totalMassKg = crewMassKg + fuelMassKg + shuttleMassKg ;
26+
let maximumMassLimit = 850000 ;
27+
let fuelTempCelsius = -225 ;
28+
let minimumFuelTemp = -300 ;
29+
let maximumFuelTemp = -150 ;
30+
let fuelLevel = "100%" ;
31+
let weatherStatus = "clear" ;
32+
let preparedForLiftOff = true ;
33+
34+
if (astronautCount <= 7) {
35+
console.log("All crew Counted.");
36+
}
37+
if (astronautStatus === "ready") {
38+
console.log ("All crew Prepared.") ;
39+
}
40+
if (totalMassKg < 85000) {
41+
console.log ("Weight level stable.") ;
42+
}
43+
if (fuelTempCelsius > -300 && fuelTempCelsius < -150) {
44+
console.log("fuel temperature safe.") ;
45+
}
46+
if (fuelLevel === "100%") {
47+
console.log("Temperature safe.") ;
48+
}
49+
if (weatherStatus === "clear") {
50+
console.log ("shuttle ready for launch!")
51+
}
52+
else console.log ("Error in launch! Check Weight, Fuel, and Weather.") ;
53+
54+

booleans-and-conditionals/studio/package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)