Skip to content

Commit 8a5ea92

Browse files
Update FloorCeilandRint.py
Alternate solution commented out. Original Solution retained as suggested.
1 parent cc9832b commit 8a5ea92

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

Numpy/FloorCeilandRint.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,16 @@
44
Domain : Python
55
Author : Ahmedur Rahman Shovon
66
Created : 15 July 2016
7+
Updated : 17 March 2021
78
Problem : https://www.hackerrank.com/challenges/floor-ceil-and-rint/problem
89
'''
910
import numpy as np
10-
np.set_printoptions(sign=' ')
11-
a = np.array(input().split(), float)
12-
print(*(f(a) for f in [np.floor, np.ceil, np.rint]), sep='\n')
11+
12+
np.set_printoptions(legacy='1.13')
13+
A = np.array(input().split(), float)
14+
print(np.floor(A))
15+
print(np.ceil(A))
16+
print(np.rint(A))
17+
18+
# Alternate solution
19+
# print(*(f(A) for f in [np.floor, np.ceil, np.rint]), sep='\n')

0 commit comments

Comments
 (0)