instruction stringlengths 2.01k 8.44k | input stringclasses 1
value | output stringlengths 180 2.3k |
|---|---|---|
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def compute_escape_velocity(mu, R):
'''Compute the escape velocity from the surface of a celestial body.
Inputs:
mu: standard gravitational parameter in m^3/s^2, float
R: radius of the body in m, float
Output:
v_e: escape velocity in m/s, float
'''
v_e = math.sqrt(2.0 * mu / R)
retur... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def moon_escape_velocity(G, M, R):
'''Compute the minimum escape velocity of a spacecraft from the moon.
Inputs:
G: universal gravitational constant in m^3/(kg s^2), float
M: mass of the moon in kg, float
R: radius of the moon in m, float
Output:
escape_velocity: minimum escape velocity in m... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def compute_hartree_joules(m_e, e, kappa_0, hbar):
'''Compute the Hartree energy in Joules.
Inputs:
m_e: mass of an electron in kg, float
e: elementary charge in C, float
kappa_0: permittivity factor 4*pi*epsilon_0 in C^2 J^-1 m^-1, float
hbar: reduced Planck constant in J s, float
Output:
... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def convert_joules_to_ev(energy_joules, e):
'''Convert energy from Joules to electron volts.
Inputs:
energy_joules: energy in Joules, float
e: elementary charge in C, float
Output:
energy_ev: energy in electron volts, float
'''
energy_ev = energy_joules / e
return energy_ev | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def hartree_to_ev(m_e, e, kappa_0, hbar):
'''Compute the value of 1 Hartree in electron volts.
Inputs:
m_e: mass of an electron in kg, float
e: elementary charge in C, float
kappa_0: permittivity factor 4*pi*epsilon_0 in C^2 J^-1 m^-1, float
hbar: reduced Planck constant in J s, float
Output... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def convert_units(power_mW, wavelength_nm):
'''Convert power and wavelength to SI units.
Inputs:
power_mW: power in milliwatts, float
wavelength_nm: wavelength in nanometers, float
Outputs:
power_W: power in watts, float
wavelength_m: wavelength in meters, float
'''
power_W = power_m... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def photon_energy(wavelength_m, h, c):
'''Calculate the energy of a single photon.
Inputs:
wavelength_m: wavelength in meters, float
h: Planck's constant in J*s, float
c: speed of light in m/s, float
Outputs:
energy_J: energy of a single photon in Joules, float
'''
if wavelength_m ==... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def photons_per_second(power_W, energy_J):
'''Calculate the number of photons emitted per second.
Inputs:
power_W: total power output in Watts, float
energy_J: energy of a single photon in Joules, float
Outputs:
num_photons: number of photons emitted per second, float
'''
if power_W == 0... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def laser_photons_emission(power_mW, wavelength_nm):
'''Compute the total number of photons emitted per second by the laser.
Inputs:
power_mW: power output of the laser in milliwatts, float
wavelength_nm: wavelength of the emitted light in nanometers, float
Outputs:
num_photons: number of photon... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def compute_decay_constant(initial_amount, final_amount, time_interval):
'''Compute the first-order elimination rate constant.
Inputs:
initial_amount: the initial amount of the drug, float
final_amount: the amount of the drug remaining after the time interval, float
time_interval: the time interval ... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def compute_geometric_terms(decay_constant, time_interval, num_doses):
'''Compute the common ratio and its n-th power for the geometric series.
Inputs:
decay_constant: the continuous decay constant k, float
time_interval: the time interval between doses in days, float
num_doses: the number of doses ... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def compute_total_drug(dose, ratio, ratio_n):
'''Compute the total amount of drug in the body using the geometric series sum.
Inputs:
dose: the amount of drug taken in each tablet, float
ratio: the common ratio r, float
ratio_n: the common ratio raised to the power of n, float
Output:
total_... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def solve_drug_quantity(dose, rate, n):
'''Determine the total quantity of the drug in the body after the n-th tablet.
Inputs:
dose: the amount of drug taken in each tablet in mg, float
rate: the fraction of the drug remaining in the body just before the next tablet, float
n: the number of tablets t... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def convert_pm_to_m(delta_x_pm):
'''Convert position uncertainty from picometers to meters.
Inputs:
delta_x_pm: uncertainty in position in picometers, float
Output:
delta_x_m: uncertainty in position in meters, float
'''
delta_x_m = float(delta_x_pm) * 1e-12
return delta_x_m | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def compute_momentum_uncertainty(delta_x_m, h=6.62607015e-34):
'''Compute the minimum uncertainty in momentum.
Inputs:
delta_x_m: uncertainty in position in meters, float
h: Planck constant in J s, float
Output:
delta_p: minimum uncertainty in momentum in kg m/s, float
'''
delta_p = h / ... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def compute_speed_uncertainty(delta_p, m_e=9.10938356e-31):
'''Compute the uncertainty in speed from the uncertainty in momentum.
Inputs:
delta_p: uncertainty in momentum in kg m/s, float
m_e: mass of the electron in kg, float
Output:
delta_v: uncertainty in speed in m/s, float
'''
delta... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def electron_speed_uncertainty(delta_x_pm):
'''Calculate the minimum uncertainty in the speed of an electron given its position uncertainty.
Inputs:
delta_x_pm: uncertainty in position in picometers, float
Output:
delta_v: minimum uncertainty in speed in m/s, float
'''
delta_x_m = convert_pm... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def convert_to_meters(d_mm, lambda_nm, L_m):
'''Convert lengths to meters.
Inputs:
d_mm: slit separation in mm, float
lambda_nm: wavelength in nm, float
L_m: distance to screen in m, float
Outputs:
d_m: slit separation in m, float
lambda_m: wavelength in m, float
L_m_out: distance to... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def compute_diffraction_angle(lambda_m, d_m, m):
'''Compute the diffraction angle for the m-th maximum.
Inputs:
lambda_m: wavelength in meters, float
d_m: slit separation in meters, float
m: order of the maximum, int or float
Output:
theta_rad: diffraction angle in radians, float
'''
... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def compute_fringe_distance(L_m, theta_rad):
'''Compute the distance on the screen in millimeters.
Inputs:
L_m: distance to the screen in meters, float
theta_rad: diffraction angle in radians, float
Output:
y_mm: distance on the screen in millimeters, float
'''
import math
y_mm = L_m... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def double_slit_interference(d_mm, lambda_nm, L_m):
'''Calculate the distance between the central and first maximum.
Inputs:
d_mm: slit separation in millimeters, float
lambda_nm: wavelength of light in nanometers, float
L_m: distance to the detector in meters, float
Output:
y_mm: distance b... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def convert_speed(speed_kmh):
'''Convert speed from km/hr to m/s.
Inputs:
speed_kmh: speed in km/hr, float
Output:
speed_ms: speed in m/s, float
'''
speed_ms = float(speed_kmh) * 1000.0 / 3600.0
return speed_ms | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def time_of_flight(height, g):
'''Calculate the time of flight for an object dropped from a height.
Inputs:
height: height in meters, float
g: acceleration due to gravity in m/s^2, float
Output:
time: time of flight in seconds, float
'''
import math
time = math.sqrt(2.0 * height / g)... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def horizontal_travel(speed_ms, time):
'''Calculate the horizontal distance traveled.
Inputs:
speed_ms: horizontal speed in m/s, float
time: time of flight in seconds, float
Output:
distance: horizontal distance in meters, float
'''
distance = float(speed_ms) * float(time)
return dis... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def solve_drop_distance(plane_speed_kmh, height_m, offset_m, g):
'''Calculate the total distance behind the cattle to drop the bales.
Inputs:
plane_speed_kmh: speed of the airplane in km/hr, float
height_m: height from which the bales are dropped in meters, float
offset_m: desired distance behind th... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def convert_ev_to_joules(work_function_ev):
'''Convert work function from eV to Joules.
Inputs:
work_function_ev: work function in electron volts, float
Output:
work_function_j: work function in Joules, float
'''
e = 1.602176634e-19
work_function_j = float(work_function_ev) * e
retur... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def compute_threshold_frequency_hz(work_function_j):
'''Compute the threshold frequency in Hz given the work function in Joules.
Inputs:
work_function_j: work function in Joules, float
Output:
threshold_frequency_hz: threshold frequency in Hertz, float
'''
h = 6.626e-34
threshold_frequen... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def scale_frequency(frequency_hz):
'''Scale the frequency to units of 10^14 Hz.
Inputs:
frequency_hz: frequency in Hertz, float
Output:
scaled_frequency: frequency scaled by 10^-14, float
'''
scaled_frequency = float(frequency_hz) / 1e14
return scaled_frequency | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def threshold_frequency_sodium(work_function_ev):
'''Calculate the scaled threshold frequency for a given work function in eV.
Inputs:
work_function_ev: work function in electron volts, float
Output:
final_scaled_frequency: threshold frequency in units of 10^14 Hz, float
'''
energy_j = conve... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def convert_dissociation_energy(D_kJ_mol):
'''Convert dissociation energy from kJ/mol to Joules per molecule.
Inputs:
D_kJ_mol: dissociation energy in kJ/mol, float
Output: dissociation energy in Joules per molecule, float
'''
N_A = 6.02214076e23
D_J = float(D_kJ_mol * 1000.0 / N_A)
retu... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def compute_vibrational_energy(omega_e):
'''Compute the vibrational quantum energy in Joules.
Inputs:
omega_e: harmonic vibrational wavenumber in cm^-1, float
Output: vibrational energy in Joules, float
'''
h = 6.62607015e-34 # Planck's constant in J*s
c = 2.99792458e10 # Speed of light i... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def compute_anharmonicity_constant(E_J, D_J):
'''Calculate the dimensionless anharmonicity constant.
Inputs:
E_J: vibrational energy in Joules, float
D_J: dissociation energy in Joules per molecule, float
Output: anharmonicity constant, float
'''
x_e = float(E_J / (4.0 * D_J))
return x_e | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def solve_morse_anharmonicity(omega_e, D_kJ_mol):
'''Calculate the anharmonicity constant for a Morse potential.
Inputs:
omega_e: harmonic vibrational wavenumber in cm^-1, float
D_kJ_mol: dissociation energy in kJ/mol, float
Output: anharmonicity constant, float
'''
D_J = convert_dissociatio... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def calculate_velocity(speed_percentage, c):
'''Calculate the velocity of a particle based on a percentage of the speed of light.
Inputs:
speed_percentage: percentage of the speed of light, float
c: speed of light in m/s, float
Output:
velocity: velocity of the particle in m/s, float
'''
... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def calculate_momentum(velocity, mass):
'''Calculate the classical linear momentum of a particle.
Inputs:
velocity: velocity of the particle in m/s, float
mass: mass of the particle in kg, float
Output:
momentum: linear momentum in kg*m/s, float
'''
momentum = mass * velocity
return ... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def calculate_de_broglie_wavelength(momentum, h):
'''Calculate the de Broglie wavelength of a particle.
Inputs:
momentum: linear momentum of the particle in kg*m/s, float
h: Planck's constant in J*s, float
Output:
wavelength_m: de Broglie wavelength in meters, float
'''
if momentum == 0.... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def solve_de_broglie_problem(speed_percentage):
'''Solve for the de Broglie wavelength of an electron in picometers.
Inputs:
speed_percentage: percentage of the speed of light, float
Output:
wavelength_pm: de Broglie wavelength in picometers, float
'''
c = 2.998e8
m_e = 9.109e-31
h =... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def compute_reduced_mass(mass_amu):
'''Compute the reduced mass of a homonuclear diatomic molecule in kg.
Inputs:
mass_amu: atomic mass of the atom in amu, float
Output:
reduced_mass_kg: reduced mass in kg, float
'''
AMU_TO_KG = 1.660539e-27
reduced_mass_kg = (mass_amu / 2.0) * AMU_TO_KG... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def compute_angular_frequency(force_constant, reduced_mass_kg):
'''Compute the angular frequency of the vibration.
Inputs:
force_constant: force constant in N/m, float
reduced_mass_kg: reduced mass in kg, float
Output:
omega: angular frequency in rad/s, float
'''
omega = math.sqrt(force_... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def compute_wavenumber(omega):
'''Convert angular frequency to wavenumber in cm^-1.
Inputs:
omega: angular frequency in rad/s, float
Output:
nu_tilde: vibrational frequency in cm^-1, float
'''
c = 2.9979e10
nu_tilde = omega / (2.0 * math.pi * c)
return float(nu_tilde) | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def fundamental_vibrational_frequency(force_constant, mass_amu):
'''Calculate the fundamental vibrational frequency of a homonuclear diatomic molecule.
Inputs:
force_constant: force constant in N/m, float
mass_amu: atomic mass of the isotope in amu, float
Output:
nu_tilde: fundamental vibrationa... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def compute_reduced_mass_kg(mass1_amu, mass2_amu):
'''Compute the reduced mass of a diatomic molecule in kilograms.
Inputs:
mass1_amu: mass of the first atom in amu, float
mass2_amu: mass of the second atom in amu, float
Output:
reduced_mass_kg: reduced mass in kg, float
'''
amu_to_kg = ... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def compute_frequency_hz(wavenumber_cm_inv):
'''Convert wavenumber in cm^-1 to frequency in Hz.
Inputs:
wavenumber_cm_inv: wavenumber in cm^-1, float
Output:
frequency_hz: frequency in Hz, float
'''
c = 2.9979e10
frequency_hz = c * wavenumber_cm_inv
return frequency_hz | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def compute_force_constant(reduced_mass_kg, frequency_hz):
'''Calculate the force constant of a diatomic molecule.
Inputs:
reduced_mass_kg: reduced mass in kg, float
frequency_hz: vibrational frequency in Hz, float
Output:
force_constant: force constant in N/m, float
'''
force_constant =... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def solve_problem(wavenumber, mass_h_amu, mass_i_amu):
'''Calculate the force constant of H-I given its IR wavenumber and atomic masses.
Inputs:
wavenumber: the observed vibrational wavenumber in cm^-1, float
mass_h_amu: atomic mass of Hydrogen in amu, float
mass_i_amu: atomic mass of Iodine-127 in ... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def compute_kinetic_energy(mass, velocity):
'''Compute the initial kinetic energy of the block.
Inputs:
mass: mass of the block in kg, float
velocity: initial speed of the block in m/s, float
Output:
kinetic_energy: initial kinetic energy in Joules, float
'''
kinetic_energy = 0.5 * mass ... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def compute_spring_compression(kinetic_energy, spring_constant):
'''Compute the maximum compression of the spring given the total kinetic energy.
Inputs:
kinetic_energy: total kinetic energy of the block in Joules, float
spring_constant: spring constant in N/m, float
Output:
compression: maximum... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def solve_spring_compression(mass, velocity, spring_constant):
'''Solve for the maximum compression of the spring.
Inputs:
mass: mass of the block in kg, float
velocity: initial speed of the block in m/s, float
spring_constant: spring constant in N/m, float
Output:
max_compression: maximum c... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def compute_bonding_c1(overlap_integral):
'''Compute the normalization constant for the bonding orbital.
Inputs:
overlap_integral: the overlap integral S, float
Output: normalization constant c1, float
'''
c1 = 1.0 / math.sqrt(2.0 + 2.0 * overlap_integral)
return c1 | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def compute_antibonding_c1(overlap_integral):
'''Compute the normalization constant for the antibonding orbital.
Inputs:
overlap_integral: the overlap integral S, float
Output: normalization constant c1, float
'''
c1 = 1.0 / math.sqrt(2.0 - 2.0 * overlap_integral)
return c1 | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def solve_huckel_ethene(overlap_integral):
'''Calculate the normalization constants for bonding and antibonding orbitals of ethene.
Inputs:
overlap_integral: the overlap integral S, float
Output: tuple of (c1_bonding, c1_antibonding), both floats
'''
c1_bonding = compute_bonding_c1(overlap_integ... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def compute_wave_parameters(a, n):
'''Compute the normalization constant and wave vector for the particle in a box.
Inputs:
a: length of the box, float
n: quantum number, int
Outputs:
A: normalization constant, float
k: wave vector, float
'''
A = math.sqrt(2.0 / a)
k = n * math.p... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def evaluate_indefinite_integral(x, k):
'''Evaluate the indefinite integral of sin^2(kx) at position x.
Inputs:
x: position, float
k: wave vector, float
Output:
integral_value: value of the indefinite integral at x, float
'''
if k == 0.0:
return 0.0
integral_value = x / 2.0 -... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def calculate_probability(a, n):
'''Calculate the probability of finding the particle between 0 and a/2.
Inputs:
a: length of the box, float
n: quantum number, int
Output:
probability: probability of finding the particle in the left half of the box, float
'''
A, k = compute_wave_paramete... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def compute_reduced_mass(mass_proton, mass_muon):
'''Compute the reduced mass of the proton-muon system.
Inputs:
mass_proton: mass of the proton in kg, float
mass_muon: mass of the muon in kg, float
Output:
reduced_mass: reduced mass of the system in kg, float
'''
reduced_mass = (mass_pr... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def compute_ground_state_energy(reduced_mass, elementary_charge, vacuum_permittivity, planck_constant):
'''Compute the ground state energy of the mesonic atom using the Bohr model.
Inputs:
reduced_mass: reduced mass of the system in kg, float
elementary_charge: elementary charge in C, float
vacuum_p... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def compute_transition_frequency(ground_energy, n_initial, n_final, planck_constant):
'''Compute the transition frequency between two energy levels.
Inputs:
ground_energy: ground state energy in Joules, float
n_initial: initial principal quantum number, int
n_final: final principal quantum number, i... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def mesonic_atom_transition(mass_proton, mass_muon, elementary_charge, vacuum_permittivity, planck_constant, n_initial, n_final):
'''Calculate the transition frequency for a mesonic atom.
Inputs:
mass_proton: mass of a proton in kg, float
mass_muon: mass of a muon in kg, float
elementary_charge: ele... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def compute_total_resistance(R1, R2, R3):
'''Compute the total resistance of three resistors in parallel.
Inputs:
R1: resistance of the first resistor, float
R2: resistance of the second resistor, float
R3: resistance of the third resistor, float
Output:
R: total equivalent resistance, float... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def compute_absolute_errors(R1, R2, R3, percentage_error):
'''Compute the absolute errors for each resistor.
Inputs:
R1: resistance of the first resistor, float
R2: resistance of the second resistor, float
R3: resistance of the third resistor, float
percentage_error: percentage error (e.g., 0.5 ... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def compute_partial_derivatives(R, R1, R2, R3):
'''Compute the partial derivatives of R with respect to R1, R2, and R3.
Inputs:
R: total equivalent resistance, float
R1: resistance of the first resistor, float
R2: resistance of the second resistor, float
R3: resistance of the third resistor, flo... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def compute_maximum_error(dR1, dR2, dR3, dR_dR1, dR_dR2, dR_dR3):
'''Compute the maximum error in the total resistance using the total differential.
Inputs:
dR1, dR2, dR3: absolute errors for each resistor, floats
dR_dR1, dR_dR2, dR_dR3: partial derivatives of R with respect to each resistor, floats
... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def estimate_resistance_error(R1, R2, R3, percentage_error):
'''Estimate the maximum error in the calculated value of R.
Inputs:
R1: resistance of the first resistor, float
R2: resistance of the second resistor, float
R3: resistance of the third resistor, float
percentage_error: percentage error... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def compute_reduced_mass(m1_amu, m2_amu):
'''Calculate the reduced mass of a diatomic molecule in kg.
Inputs:
m1_amu: mass of atom 1 in amu, float
m2_amu: mass of atom 2 in amu, float
Output: reduced mass in kg, float
'''
AMU_TO_KG = 1.66054e-27
if m1_amu + m2_amu == 0.0:
mu_kg =... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def convert_dissociation_energy(D_kJ_mol):
'''Convert dissociation energy from kJ/mol to J/molecule.
Inputs:
D_kJ_mol: dissociation energy in kJ/mol, float
Output: dissociation energy in J/molecule, float
'''
N_A = 6.022e23
D_J = D_kJ_mol * 1000.0 / N_A
return D_J | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def compute_beta(omega_obs, mu_kg, D_J):
'''Calculate the Morse potential parameter beta.
Inputs:
omega_obs: observed vibrational frequency in cm^-1, float
mu_kg: reduced mass in kg, float
D_J: dissociation energy in J/molecule, float
Output: beta parameter in 10^10 m^-1, float
'''
impor... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def solve_problem(omega_obs, D_kJ_mol, m_H_amu, m_Cl_amu):
'''Solve for the Morse potential parameter beta.
Inputs:
omega_obs: observed vibrational frequency in cm^-1, float
D_kJ_mol: dissociation energy in kJ/mol, float
m_H_amu: mass of hydrogen atom in amu, float
m_Cl_amu: mass of chlorine-35 ... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def initial_orbit_radius(R_E, h1):
'''Calculate the initial orbital radius.
Inputs:
R_E: Earth's radius in meters, float
h1: initial altitude in km, float
Output:
r1: initial orbital radius in meters, float
'''
if h1 == 0:
return R_E
r1 = R_E + h1 * 1000.0
return r1 | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def synchronous_orbit_radius(tau, mu):
'''Calculate the radius of the synchronous orbit.
Inputs:
tau: orbital period in hours, float
mu: standard gravitational parameter in m^3/s^2, float
Output:
r2: final orbital radius in meters, float
'''
tau_s = tau * 3600.0
r2 = (mu * tau_s**2 /... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def orbit_energy(m, mu, r):
'''Compute the total mechanical energy of a circular orbit.
Inputs:
m: mass of the spacecraft in kg, float
mu: standard gravitational parameter in m^3/s^2, float
r: orbital radius in meters, float
Output:
E: total mechanical energy in Joules, float
'''
E =... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def transfer_energy(m, h1, tau, R_E, mu):
'''Calculate the minimum energy required for the orbit transfer.
Inputs:
m: mass of the spacecraft in kg, float
h1: initial altitude in km, float
tau: period of the final synchronous orbit in hours, float
R_E: Earth's radius in meters, float
mu: stan... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def compute_thrust(burn_rate, exhaust_velocity):
'''
Computes the thrust of the rocket.
Inputs:
burn_rate: rate of fuel consumption in kg/s, float
exhaust_velocity: velocity of exhaust gases in m/s, float
Output:
thrust: the upward thrust force in Newtons, float
'''
thrust ... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def compute_liftoff_mass(thrust, g):
'''
Computes the mass of the rocket at the moment of lift-off.
Inputs:
thrust: the upward thrust force in Newtons, float
g: acceleration due to gravity in m/s^2, float
Output:
liftoff_mass: the mass of the rocket at lift-off in kg, float
'''... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def compute_liftoff_time(initial_mass, liftoff_mass, burn_rate):
'''
Computes the time required for the rocket to lift off.
Inputs:
initial_mass: the initial mass of the rocket in kg, float
liftoff_mass: the mass of the rocket at lift-off in kg, float
burn_rate: rate of fuel consumption in ... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def rocket_liftoff_time(initial_mass, burn_rate, exhaust_velocity, g):
'''
Calculates the time after engine firing when the rocket lifts off.
Inputs:
initial_mass: the initial mass of the rocket in kg, float
burn_rate: rate of fuel consumption in kg/s, float
exhaust_velocity: velocity of ex... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def solve_wien_x(tol, max_iter):
'''Numerically solve the transcendental equation for Wien's displacement law.
Inputs:
tol: tolerance for convergence, float
max_iter: maximum number of iterations, int
Output:
x: the dimensionless root of the equation, float
'''
import math
x = 5.0
... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to nu... | def compute_wien_constant(x, h, c, k_B):
'''Compute Wien's displacement constant.
Inputs:
x: dimensionless constant from the transcendental equation, float
h: Planck constant in J s, float
c: speed of light in m/s, float
k_B: Boltzmann constant in J/K, float
Output:
b: Wien's displacemen... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to nu... | def earth_blackbody_wavelength(T, h, c, k_B, tol, max_iter):
'''Calculate the maximum wavelength of the earth's blackbody radiation.
Inputs:
T: mean temperature of the earth's surface in Kelvin, float
h: Planck constant in J s, float
c: speed of light in m/s, float
k_B: Boltzmann constant in J/K... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def compute_gravitational_force(m, g):
'''Compute the gravitational force acting on an object.
Inputs:
m: mass of the object in kg, float
g: acceleration due to gravity in m/s^2, float
Output:
F_g: gravitational force in Newtons, float
'''
F_g = m * g
return F_g | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def compute_terminal_velocity(F_g, m, k):
'''Compute the terminal velocity of an object under linear drag.
Inputs:
F_g: gravitational force in Newtons, float
m: mass of the object in kg, float
k: drag constant in s^-1, float
Output:
v_t: terminal velocity in m/s, float
'''
v_t = F_g ... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def potato_terminal_velocity(m, k, g):
'''Find the terminal velocity of a potato falling under gravity with linear drag.
Inputs:
m: mass of the potato in kg, float
k: drag constant in s^-1, float
g: acceleration due to gravity in m/s^2, float
Output:
terminal_velocity: terminal velocity in m... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def compute_gradient_equations(A, B, C, D, E):
'''Compute the matrix and vector for the gradient equations.
Inputs:
A: coefficient of xy, float
B: coefficient of x^2, float
C: coefficient of y^2, float
D: coefficient of x, float
E: coefficient of y, float
Outputs:
M: 2x2 coefficient ... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def solve_critical_point(M, v):
'''Solve the linear system to find the critical point.
Inputs:
M: 2x2 coefficient matrix, numpy array
v: right-hand side vector, numpy array
Outputs:
x: x-coordinate of the critical point, float
y: y-coordinate of the critical point, float
'''
import n... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def hill_top_x(A, B, C, D, E, F):
'''Find the x-coordinate of the top of the hill.
Inputs:
A : float, coefficient of xy
B : float, coefficient of x^2
C : float, coefficient of y^2
D : float, coefficient of x
E : float, coefficient of y
F : float, constant term
Outputs:
x_peak : f... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def compute_moment_of_inertia(line_spacing_hz):
'''Calculate the moment of inertia from microwave spectral line spacing.
Inputs:
line_spacing_hz: spacing between spectral lines in Hz, float
Output:
moment_of_inertia: moment of inertia in kg*m^2, float
'''
import math
h = 6.626e-34
mo... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def compute_reduced_mass(mass1_amu, mass2_amu):
'''Calculate the reduced mass of a diatomic molecule in kg.
Inputs:
mass1_amu: mass of atom 1 in amu, float
mass2_amu: mass of atom 2 in amu, float
Output:
reduced_mass_kg: reduced mass in kg, float
'''
amu_to_kg = 1.660539e-27
mu_amu =... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def compute_bond_length(moment_of_inertia, reduced_mass_kg):
'''Calculate the bond length of a diatomic molecule in pm.
Inputs:
moment_of_inertia: moment of inertia in kg*m^2, float
reduced_mass_kg: reduced mass in kg, float
Output:
bond_length_pm: bond length in picometers, float
'''
im... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def microwave_spectrum_bond_length(line_spacing_hz, mass1_amu, mass2_amu):
'''Calculate the bond length of a diatomic molecule from its microwave spectrum.
Inputs:
line_spacing_hz: spacing between spectral lines in Hz, float
mass1_amu: mass of atom 1 in amu, float
mass2_amu: mass of atom 2 in amu, f... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def convert_mass_units(m1_g, m2_g):
'''Convert masses from grams to kilograms.
Inputs:
m1_g: mass of the first body in grams, float
m2_g: mass of the second body in grams, float
Outputs:
m1_kg: mass of the first body in kilograms, float
m2_kg: mass of the second body in kilograms, float
... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def compute_reduced_mass(m1_kg, m2_kg):
'''Compute the reduced mass of a two-body system.
Inputs:
m1_kg: mass of the first body in kilograms, float
m2_kg: mass of the second body in kilograms, float
Outputs:
reduced_mass: reduced mass of the system in kilograms, float
'''
if m1_kg + m2_k... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def compute_angular_frequency(k, reduced_mass):
'''Compute the angular frequency of the oscillatory motion.
Inputs:
k: force constant of the spring in N/m, float
reduced_mass: reduced mass of the system in kilograms, float
Outputs:
omega: angular frequency in rad/s, float
'''
omega = mat... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def oscillation_frequency_system(m1_g, m2_g, k):
'''Compute the frequency of oscillatory motion for the two-mass system.
Inputs:
m1_g: mass of the first body in grams, float
m2_g: mass of the second body in grams, float
k: force constant of the spring in N/m, float
Outputs:
omega: angular fr... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def compute_logarithmic_decrement(n_cycles, amplitude_ratio):
'''Compute the logarithmic decrement of a damped oscillator.
Inputs:
n_cycles: number of cycles elapsed, float
amplitude_ratio: ratio of the final amplitude to the initial amplitude, float
Output:
log_decrement: logarithmic decrement,... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def compute_damping_ratio(log_decrement):
'''Compute the damping ratio from the logarithmic decrement.
Inputs:
log_decrement: logarithmic decrement of the oscillator, float
Output:
damping_ratio: damping ratio zeta, float
'''
import math
damping_ratio = log_decrement / math.sqrt(4 * math... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def compute_damped_to_natural_ratio(damping_ratio):
'''Compute the ratio of damped frequency to natural frequency.
Inputs:
damping_ratio: damping ratio zeta, float
Output:
freq_ratio: ratio of damped frequency to natural frequency, float
'''
import math
val = 1.0 - damping_ratio**2
i... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def solve_oscillator_ratio(n_cycles, amplitude_ratio):
'''Solve for the ratio of the damped frequency to the natural frequency.
Inputs:
n_cycles: number of cycles elapsed, float
amplitude_ratio: ratio of the final amplitude to the initial amplitude, float
Output:
final_freq_ratio: ratio of dampe... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def convert_to_si(mass_g, k_dyne_cm):
'''Convert mass and spring constant to SI units.
Inputs:
mass_g: mass in grams, float
k_dyne_cm: spring constant in dyne/cm, float
Outputs:
mass_kg: mass in kilograms, float
k_n_m: spring constant in N/m, float
'''
mass_kg = float(mass_g) * 1e-3
... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def compute_angular_frequency(mass_kg, k_n_m):
'''Compute the angular frequency of the oscillator.
Inputs:
mass_kg: mass in kilograms, float
k_n_m: spring constant in N/m, float
Output:
omega_0: angular frequency in rad/s, float
'''
import math
omega_0 = math.sqrt(k_n_m / mass_kg)
... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def compute_natural_frequency(omega_0):
'''Compute the natural frequency from the angular frequency.
Inputs:
omega_0: angular frequency in rad/s, float
Output:
nu_0: natural frequency in Hz, float
'''
import math
nu_0 = omega_0 / (2 * math.pi)
return nu_0 | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def harmonic_oscillator_frequency(mass_g, k_dyne_cm):
'''Calculate the natural frequency of a simple harmonic oscillator.
Inputs:
mass_g: mass of the oscillator in grams, float
k_dyne_cm: spring force constant in dyne/cm, float
Output:
nu_0: natural frequency in Hz, float
'''
mass_kg, k_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.