Add a solution to question 36

This commit is contained in:
Haksell
2020-05-02 10:08:01 +02:00
parent 8c96897af3
commit b8093ccf5c

View File

@@ -431,10 +431,11 @@ hint: %, np.floor, astype, np.trunc
< a36 < a36
Z = np.random.uniform(0,10,10) Z = np.random.uniform(0,10,10)
print (Z - Z%1) print(Z - Z%1)
print (np.floor(Z)) print(Z // 1)
print (Z.astype(int)) print(np.floor(Z))
print (np.trunc(Z)) print(Z.astype(int))
print(np.trunc(Z))
< q37 < q37
Create a 5x5 matrix with row values ranging from 0 to 4 (★★☆) Create a 5x5 matrix with row values ranging from 0 to 4 (★★☆)