Floor, Ceil and Rint

Sort by

recency

|

276 Discussions

|

  • + 0 comments

    code is

    import numpy

    numpy.set_printoptions(legacy='1.13')

    my_arr = list(map(float, input().split()))

    print(numpy.floor(my_arr)) print(numpy.ceil(my_arr)) print(numpy.rint(my_arr))

  • + 0 comments
    import numpy
    numpy.set_printoptions(legacy="1.13")
    l = list(map(float, input().split()))
    np_arr = numpy.array(l)
    print( numpy.floor(np_arr) )
    print( numpy.ceil(np_arr) )
    print( numpy.rint(np_arr) )
    
  • + 0 comments

    import numpy numpy.set_printoptions(legacy='1.13') A = numpy.array(list(map(float, input().strip().split()))) print(numpy.floor(A)) print(numpy.ceil(A)) print(numpy.rint(A))

  • + 0 comments
    import numpy
    
    numpy.set_printoptions(legacy='1.13')
    
    my_arr = list(map(float, input().split()))
    
    print(numpy.floor(my_arr))
    print(numpy.ceil(my_arr))
    print(numpy.rint(my_arr))
    
  • + 0 comments
    import numpy as np
    np.set_printoptions(legacy='1.13')
    
    actions = ["floor", "ceil", "rint"]
    
    a = list(map(float, input().split()))
    
    for action in actions:
        result = getattr(np, action)(a)
        print(result)