Physics Formula Solver

This is a multipurpose Python-based console application designed for high school students to understand and solve numerical problems across various physics topics. The user selects a topic, enters the required inputs, and receives calculated results based on fundamental physics formulae.


📚 Topics Covered

1. Mechanics

  • Newton's Second Law: F = m * a
    Force (F) is the product of mass (m) and acceleration (a). This formula describes how much force is needed to move an object.

  • Kinetic Energy: KE = 0.5 * m * v²
    Kinetic Energy (KE) is the energy possessed by a moving object. It's proportional to its mass and the square of its velocity.

  • Gravitational Potential Energy: PE = m * g * h
    Potential Energy (PE) is the stored energy due to an object’s position in a gravitational field. Here, g is the gravitational acceleration (9.8 m/s²), and h is height.

2. Electricity

  • Ohm's Law: V = I * R
    Voltage (V) is the product of current (I) and resistance (R). It shows how voltage changes with current and resistance.

  • Electric Power: P = V * I
    Power (P) in an electric circuit is calculated by multiplying voltage (V) and current (I).

3. Thermodynamics

  • Heat Transfer: Q = m * c * ΔT
    Heat (Q) is the amount of energy transferred due to temperature difference. It depends on mass (m), specific heat capacity (c), and temperature change (ΔT).

4. Optics

  • Lens Formula: 1/f = 1/v - 1/u
    Relates the focal length (f) of a lens to the image distance (v) and object distance (u). Positive and negative signs depend on conventions.

5. Motion (Kinematics)

  • Final Velocity: v = u + a * t
    Final velocity (v) is the initial velocity (u) plus the product of acceleration (a) and time (t).

  • Distance: s = ut + 0.5 * a * t²
    Distance (s) covered under constant acceleration is a combination of initial motion and accelerated motion.

6. Waves

  • Wave Speed: v = f * λ
    Wave speed (v) is the product of frequency (f) and wavelength (λ). Describes how fast a wave propagates.

7. Modern Physics

  • Photon Energy: E = h * f
    Energy (E) of a photon is directly proportional to its frequency (f). Planck's constant (h = 6.626 x 10⁻³⁴ J·s).

8. Fluid Mechanics

  • Pressure: P = F / A
    Pressure (P) is the force (F) applied per unit area (A).

9. Magnetism

  • Magnetic Force: F = q * v * B * sin(θ)
    The force (F) on a moving charge (q) in a magnetic field (B), where v is the velocity and θ is the angle between v and B.

10. Relativity

  • Time Dilation: t' = t / √(1 - v² / c²)
    Time (t') observed in motion appears longer than time (t) measured at rest. This formula applies for velocities close to the speed of light (c = 3 x 10⁸ m/s).

🧠 How It Works

  1. The program starts with a main menu listing all physics topics.
  2. After selecting a topic, users are prompted to choose a formula or sub-concept.
  3. The program asks for input values needed for the formula.
  4. The formula is applied and the result is printed.

✅ Features

  • Covers key high school physics concepts
  • Interactive and beginner-friendly
  • Accurate formula-based computations

🚀 How to Run

  1. Make sure Python is installed.
  2. Save the code as physics_solver.py
  3. Run using command:
python physics_solver.py

👨‍🎓 Project Use Case

Perfect for high school students as a physics revision tool or as a submission for a school project involving Python and Physics integration.


🔧 Author Note

Designed to encourage hands-on learning of both programming and science. Built with clarity and accessibility in mind.

🧲 Download the Code

Download