2016-09-28 56 views

回答

0

答案很简单。只需使用round,然后用, #Number of spaces指定地点。在这个例子中,我做了5个小数位。

import random 
newAgent = [random.gauss(0, 1), random.gauss(0, 1)] 
print(round(newAgent[0], 5), round(newAgent[1], 5)) 
相关问题