Latest web development tutorials

Pythonは演習50を含んでいます

Pythonの100リー Pythonの100リー

タイトル:出力乱数。

プログラム解析:ランダムなモジュールを使用。

ソースコード:

#!/usr/bin/python
# -*- coding: UTF-8 -*-

import random

#生成 10 到 20 之间的随机数
print random.uniform(10, 20)  

上の例の出力は、次のとおりです。

14.4012371357

Pythonの100リー Pythonの100リー