Floor, Ceil and Rint

  • + 0 comments

    import numpy as np

    np.set_printoptions(legacy='1.13')

    def floor_ceil_rint(x): function_list = ['floor' ,'ceil' ,'rint']

    for i in function_list:
        func = getattr(np, i)
        print(func(x))
    

    sample_input = list(map(float, input().split())) floor_ceil_rint(sample_input)