samedi 25 juillet 2020

Select a part of a float value and randomize the missing part in Python

If i have a float number like float = 51.31876543.

How can I create a new float value selecting the first seven numbers and generating randomly the remain numbers? To obtain something like this:

float = 51.31876 + 3 random numbers
like 51.31876411 or 51.31876739 ...



Aucun commentaire:

Enregistrer un commentaire