vendredi 12 février 2021

How can I generate three random numbers in python as a vector components fulfiling the magnitude of the vector

I was wondering how I can generate random numbers in python for Fx, Fy, and Fz in the equation F = sqrt (Fx^2+ Fy^2+Fz^2), where F e.g, is [10, 20, 30, 40] and I would also like to store the values of Fx, Fy, and Fz in three different lists.

Thank you in advance.




Aucun commentaire:

Enregistrer un commentaire