Skip to content

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jjsaund
Copy link

@jjsaund jjsaund commented Dec 15, 2024

Hope this works!

BW
Jasjot

@antsh3k
Copy link
Owner

antsh3k commented Dec 16, 2024

Very elegant solution. Well done. The wrapping paper is on order:

A couple minor comments:

  1. Wrapping has a spelling mistake
  2. Create a git .gitignore file to ignore the *.csv
    This is useful so that you are not tracking data on git.
  3. Avoided using built-in names like min, max for variables


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()}")
Copy link
Owner

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]
Copy link
Owner

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.

Copy link
Owner

@antsh3k antsh3k left a 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.

Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants