Hello @mhdlyy.k ,
You are welcome!!
Seen your updated code.
Again the approach desired is not there for the graded functions.
The thing is this that your outputs are coming as expected output, but there are test cases which does not only wants specific answers but also specific methods.There are many approaches to solve a coding problem but here the grader will pass specific approach only.
And the approaches to be applied are are clearly stated in the hints and I have also explained each hint and whatever changes you need to make.Read again.
For example :
Under GRADED FUNCTION: create_train_val_dirs
It’s written in the hint :
# HINT:
# Use os.makedirs to create your directories with intermediate subdirectories
# Don't hardcode the paths. Use os.path.join to append the new directories to the root_path parameter
You have used os.path.join but You have written so many lines, writing one line for each one .
Try to think out an optimised way.
I have already given this link in my previous reply to refer:
Clearly stated how to do here that must be done in fewer lines and how it will be : Details of failed tests for create_train_test_dirs - #7 by nilosreesengupta
I would suggest you to re-read again the hints and my explanations minutely and try to figure it out.Everything is there.
And one thing I again I will say, you need to optimise your code.
Hope this helps.
With regards,
Nilosree Sengupta