mardi 4 février 2020

Writeaprogramthatgeneratesarandomdecimalnumberbetween1and10withtwodecimal places of accuracy. Examples are 1.23, 3.45, 9.80, and 5.00 [duplicate]

from random import randint
x=randint(1,10)

import random
x=random.uniform(1,10)

print(x)

I just want to generate a program with two decimals of accuracy.

2.64856316497972

I want to make a program that generated a number with two decimal of accuracy. Thank you




Aucun commentaire:

Enregistrer un commentaire