import random · #生成隨機數,浮點型別 · a = random.uniform(10, 20) · #控制隨機數的精度round(數值,精度) · print round(a, 2).
確定! 回上一頁