Generation

generate functionSat, 27 May 2023

Una funcion que calcule la constante Coulumb dandole vectores en x , y, z

import numpy as np def Coulomb(q1, q2, r1=[0,0,0], r2=[0,0,0]): k=9e9 r= np.sqrt((r2[0]-r1[0])**2+(r2[1]-r1[1])**2+(r2[2]-r1[2])**2) return k*q1*q2/r

Want to kickstart your project?Use the new AI Studio to create your code