HackerRank- Python Floor, Ceil and Rint


given a 1-D array, A . Your task is to print the floor, ceil and rint of all the elements of A.

  1. import numpy
  2. numpy.set_printoptions(sign=' ')
  3. a = numpy.array(input().split(),float)
  4. print(numpy.floor(a))
  5. print(numpy.ceil(a))
  6. print(numpy.rint(a))

download android app