# -*- coding: utf-8 -*-
from datetime import datetime as dt
from datetime import date as d

"""
python work_time.py
What time is working end time of {__day of the week__}?
Plerase your today's working-end hour >>>

Is accepted as a positive number only input value
"""
class WorkTime(object):
    DAY_OF_THE_WEEK = {
            0: "monday",
            1: "tuesday",
            2: "wednesday",
            3: "thursday",
            4: "friday",
            5: "saturday",
            6: "sunday"
            }
    ONE_HOUR = 60

    ERR_MSG = lambda x: '[{0}]\nPlease enter again!'.format(x)

    def set_value(self,weekday):
        for k,v in self.DAY_OF_THE_WEEK.items():
            if k == weekday:
                try:
                    ending_time = float(input(
                                'What time is working end time of \'{0}\'? > '.format(v)))
                    if ending_time > 0 and ending_time > dt.now().hour:
                        return ending_time
                    raise ValueError('0 > input value and now-time')
                except ValueError as e:
                    print('[{0}]\n'.format(e), 'Please enter again!')
                    return self.set_value(weekday)

    def get_time(self,hour):
        break_time = ''
        try:
            break_time = input('Do you have a break?(y/n)')
            if break_time != 'y' and break_time != 'n':
                raise ValueError('only use \'y\' or \'n\'')
            break_time = 1 if break_time == 'y' else 0
        except ValueError as e:
            print('[{0}]\n'.format(e), 'Please enter again!')
            return self.get_time(hour)

        rest = (lambda x: round(
            float(
                ((hour - x.hour) * self.ONE_HOUR - x.minute) / self.ONE_HOUR - break_time)
            , 3))(dt.now())
        print('resttime :{0}h'.format(rest))

    def __init__(self):
        self.get_time(self.set_value(d.today().weekday()))

if __name__ == '__main__':
    WorkTime()

@@ -529,72 +529,8 @@
 60%0A%0A
-    ERR_MSG = lambda x: '%5B%7B0%7D%5D%5CnPlease enter again!'.format(x)%0A%0A
     
@@ -558,16 +558,16 @@
 ekday):%0A
+
         
@@ -1043,56 +1043,28 @@
     
-print('%5B%7B0%7D%5D%5Cn'.format(e), 'Please enter again!'
+self.__print_error(e
 )%0A  
@@ -1458,56 +1458,28 @@
     
-print('%5B%7B0%7D%5D%5Cn'.format(e), 'Please enter again!'
+self.__print_error(e
 )%0A  
@@ -1687,16 +1687,16 @@
 .now())%0A
-
         
@@ -1733,16 +1733,117 @@
 rest))%0A%0A
+    def __print_error(self,e):%0A        print((lambda x: '%5B%7B0%7D%5D%5CnPlease enter again!'.format(x))(e))%0A%0A
     def 

Update work_time.py