Apr-05-2019, 11:40 PM
ok I've made the changes. I thinks its looking better but its obviously still wrong
import datetime x= input('opening time: ') y= input('closing time: ') o = datetime.time(8,3,0) p= datetime.time(16,0,0) def compute_opening_duration(t, z): if t==8,3,0 and z==16,0,0 return 7.5 elif if 8,3,1<t<8,29,59 or 16,0,1<z<15,59,59 return 7.25 else return -1
Error:File "<ipython-input-10-b0f49fce2ac6>", line 21
if t==8,3,0 and z==16,0,0
^
SyntaxError: invalid syntax