-
Notifications
You must be signed in to change notification settings - Fork 5
Hello! Here is my branch for challenge_1, enjoy #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Very elegant solution. Well done. The wrapping paper is on order: A couple minor comments:
|
|
||
data['result'] = data.apply(lambda row: total_material(row['Length'], row['Width'], row['Height']), axis=1) | ||
|
||
print(f"Total wrappping material needed: {data.result.sum()}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrapping*
def total_material(L,W,H): | ||
sa = 2*(L*W+W*H+H*L) | ||
sorted_dims = sorted([L, W, H]) | ||
min = sorted_dims[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid using built-in names like min, max for variable names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic and solution is great. Please address the specified minor chnages before I will accept the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be tracked via git. Create a .gitignore file and add *.csv
to the contents. this will stop tracking the data file.
Hope this works!
BW
Jasjot