nostr:npub1tsgw6pncspg4d5u778hk63s3pls70evs4czfsmx0fzap9xwt203qtkhtk4
Take the following information and tell me what the output would be and the energy associated with the given Q-value
[Q = (M_initial - M_final) c²]
# Constants
c = 299792458 # Speed of light in meters per second
# Function to calculate Q-value
def calculate_q_value(initial_mass, final_mass):
q_value = (initial_mass - final_mass) * c**2
return q_value
# Example usage
initial_mass = 1.007825
# Initial mass in atomic mass units
final_mass = 4.002603
# Final mass in atomic mass units
q_value = calculate_q_value(initial_mass, final_mass)
print("Q-value:", q_value, "Joules")