KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.62
System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64
User : www ( 80)
PHP Version : 8.3.8
Disable Function : NONE
Directory :  /domains/drsuper/CalculusMechanics/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /domains/drsuper/CalculusMechanics/adventure_15_activity_1_student.html
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width,initial-scale=1" />
  <!-- ✅ ADD CALCULATOR CSS HERE -->
  <link rel="stylesheet" href="images/calc-popup2.css">
  <title>Adventure 15 Activity 1 – Student</title>
  <style>
    body{
      font-size:18px;
      font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
      margin:0;
      padding:0;
      background:#f5f5fb;
      color:#222;
    }
    .wrap{
      padding:12px 18px 18px;
      max-width:none;
      margin:0;
    }
    h1{margin:0.2rem 0 0.25rem;font-size:2.1rem;}
    h2{margin-top:0.2rem;margin-bottom:0.55rem;font-size:1.55rem;}
    h3{margin-top:1rem;margin-bottom:0.45rem;font-size:1.15rem;}
    p{margin:0.4rem 0 0.8rem;line-height:1.62;}
    a{color:#1f4ed8;text-decoration:none;}
    a:hover{text-decoration:underline;}
    .card{
      border:1px solid #dde3ff;
      background:#f6f7ff;
      border-radius:14px;
      padding:1rem 1rem 0.95rem;
      margin-top:12px;
    }
       button {
  background: #e9f0ff;
  border: 2px solid #6b8cff;
  border-radius: 0;
  padding: 10px 18px;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 3px 0 #4f6fe6;
  transition: all 0.12s ease;
}
button:hover { background: #f3f7ff; }
button:active { background: #cddcff; box-shadow: 0 1px 0 #4f6fe6; transform: translateY(2px); }
button.checked {
  background: #dff5e1;
  border-color: #3a9b3a;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);
}
button.sampled {
  background: #fff3d9;
  border-color: #d9a441;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);
}
    .footer{
      margin-top:2.2rem;
      font-size:0.9rem;
      color:#777;
      text-align:left;
      border-top:1px solid #eee;
      padding-top:0.8rem;
    }
    .small{font-size:0.95rem;color:#555;}
    ul{margin:0.35rem 0 0.7rem 1.2rem;padding:0;}
    li{margin:0.25rem 0;}
    .formula{
      font-family: "Courier New", monospace;
      background:#fff;
      border:1px solid #d9dff5;
      padding:10px 12px;
      display:inline-block;
      margin:6px 0;
    }
    table{
      width:100%;
      border-collapse:collapse;
      margin:12px 0 10px;
      background:#fff;
    }
    th, td{
      border:1px solid #999;
      padding:8px 8px;
      text-align:center;
      vertical-align:middle;
    }
    th{
      background:#eceffd;
      font-weight:700;
    }
    input.answer{
      width:110px;
      padding:6px 8px;
      font-size:16px;
      border:1px solid #999;
      background:#fffef8;
      box-sizing:border-box;
    }

    .correct{
      background:#dff5e1 !important;
      border:2px solid #2e9a48 !important;
    }
    .incorrect{
      background:#fde3e3 !important;
      border:2px solid #cc3d3d !important;
    }
    .check-area{
      margin-top:12px;
      display:flex;
      flex-wrap:wrap;
      gap:12px;
      align-items:center;
    }
    .result{
      font-weight:700;
    }
    .img-placeholder{
      border:2px dashed #9aa4d6;
      background:#fff;
      padding:22px 16px;
      text-align:center;
      margin:12px 0;
    }
    #calcToggle{
    top:15px !important;
    right:15px !important;
    bottom:auto !important;
}

#calcPopup{
    top:65px !important;
    right:15px !important;
    bottom:auto !important;
}
</style>
</head>
<body>
<div class="wrap">

  <div class="nav-row">
    <a href="index.html"><button>🧭 Hub</button></a>
    <a href="adventure_15_home.html"><button class="secondary">🏠 Home</button></a>
    <a href="adventure_15_activity_2_student.html"><button class="secondary">🧩 Activity 2</button></a>
    <a href="adventure_15_activity_1_solution.html"><button class="secondary">🧠 Solution 1</button></a>
  </div>


  <div class="card">
    <h1>🧩 Adventure 15 – Activity 1</h1>
    <p class="small"><b>The Sun Controls the Solar System</b></p>
    <p>
      In this activity, you will calculate one powerful quantity, <b>GM<sub>sun</sub></b>, and then use it
      to compute orbital speed, orbit size, and orbital period for Mercury, Earth, and Neptune.
      Enter only numerical answers in the boxes below.
    </p>
  </div>

  <div class="card">
    <h2>🔹 Part I — Compute GM of the Sun</h2>
    <p>Newton’s gravitational constant:</p>
    <div class="formula">G = (6.67e-11) N m² / kg²</div>
    <p>N=Newton unit of Force=ma kg(m/s²)</p>
    <p>Mass of the Sun:</p>
    <div class="formula">M_sun = (2.0e30) kg</div>
    <p><b>Task:</b> Compute <span class="formula">GM_sun = G × M_sun</span></p>
    <p>GM<sub>sun</sub> = <input class="answer" id="gm" /> m³/s²</p>
  </div>

  <div class="card">
    <h2>📊 Table 1 — Orbital Velocity and Period for 3 Planets</h2>
    <p class="small">No decimals unless the number is less than 1.</p>
    <table>
      <tr>
        <th>Planet</th>
        <th>Distance from Sun r (m)</th>
        <th>Orbital Velocity v (m/s)</th>
        <th>Orbit Size 2πr (m)</th>
        <th>Period T (s)</th>
        <th>Period (years)</th>
      </tr>
      <tr><td>Mercury</td><td>(5.79e10)</td><td><input class="answer" id="mer_v" /></td><td><input class="answer" id="mer_c" /></td><td><input class="answer" id="mer_t" /></td><td><input class="answer" id="mer_y" /></td></tr>
      <tr><td>Earth</td><td>(1.496e11)</td><td><input class="answer" id="ear_v" /></td><td><input class="answer" id="ear_c" /></td><td><input class="answer" id="ear_t" /></td><td><input class="answer" id="ear_y" /></td></tr>
      <tr><td>Neptune</td><td>(4.495e12)</td><td><input class="answer" id="nep_v" /></td><td><input class="answer" id="nep_c" /></td><td><input class="answer" id="nep_t" /></td><td><input class="answer" id="nep_y" /></td></tr>
    </table>
    <h3>Useful Formulas</h3>
    <div class="formula">v = sqrt(GM / r)</div><br>
    <div class="formula">Orbit size = 2πr</div><br>
    <div class="formula">T = (2πr) / v</div><br>
    <div class="formula">years = seconds / 31557600</div>
    <div class="check-area">
      <button id="sampleBtn" type="button" onclick="useSampleValues()">Use Sample Values</button>
      <button id="checkBtn" type="button" onclick="checkAnswers()">Check My Answers</button>
      <span class="result" id="result"></span>
    </div>
  </div>

<script>
const answers = {
  gm: 1.334e20,
  mer_v: 47995,
  mer_c: 3.638e11,
  mer_t: 7.58e6,
  mer_y: 0.24,
  ear_v: 29855,
  ear_c: 9.40e11,
  ear_t: 3.15e7,
  ear_y: 1.00,
  nep_v: 5448,
  nep_c: 2.824e13,
  nep_t: 5.18e9,
  nep_y: 164.1
};

const sampleValues = {
  gm: '1.334e20',
  mer_v: '47995',
  mer_c: '3.638e11',
  mer_t: '7.58e6',
  mer_y: '0.24',
  ear_v: '29855',
  ear_c: '9.40e11',
  ear_t: '3.15e7',
  ear_y: '1.00',
  nep_v: '5448',
  nep_c: '2.824e13',
  nep_t: '5.18e9',
  nep_y: '164.1'
};

function num(s) {
  if(!s) return NaN;
  s = String(s).replace(/,/g,'').trim();
  return Number(s);
}

function ok(val, target) {
  if (isNaN(val)) return false;
  return Math.abs(val - target) <= Math.max(Math.abs(target)*0.03, 2);
}

function markBox(el, pass){
  el.classList.remove('correct','incorrect');
  el.classList.add(pass ? 'correct' : 'incorrect');
}

function clearMarks(){
  Object.keys(answers).forEach(id => {
    const el = document.getElementById(id);
    if(el) el.classList.remove('correct','incorrect');
  });
}

function useSampleValues(){
  Object.entries(sampleValues).forEach(([id,value]) => {
    const el = document.getElementById(id);
    if(el) el.value = value;
  });
  clearMarks();
  const sampleBtn = document.getElementById('sampleBtn');
  if(sampleBtn) sampleBtn.classList.add('sampled');
  document.getElementById('result').textContent = 'Sample values added. Now click Check My Answers.';
}

function checkAnswers() {
  let total = 0, correct = 0;
  for (const [id, target] of Object.entries(answers)) {
    total++;
    const el = document.getElementById(id);
    const val = num(el.value);
    const pass = ok(val, target);
    markBox(el, pass);
    if (pass) correct++;
  }
  const checkBtn = document.getElementById('checkBtn');
  if(checkBtn) checkBtn.classList.add('checked');
  document.getElementById('result').textContent = 'You got ' + correct + ' of ' + total + ' correct.';
}
</script>

  <div class="footer">Created by Dr. Super &amp; Spark – Powered by ChatGPT</div>
</div>
<script src="images/calc-popup2.js"></script> 
</body>
</html>

Anon7 - 2021