-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Add Volumetric Weight to Shipping Cost Calculation #3650
Comments
Input package weight, volume dimensions, and shipping rateweight = float(input("Enter the package weight in kilograms: ")) Calculate volumetric weightvolumetric_weight = (length * width * height) / 5000 Use the greater of the two weightschargeable_weight = max(weight, volumetric_weight) Calculate shipping costshipping_cost = chargeable_weight * rate print(f"Shipping Cost: {shipping_cost:.2f} USD (Based on {chargeable_weight:.2f} kg)") |
Hi Ceay44, Thank you so much for taking the time to respond to my issue from September! I really appreciate you looking into it and providing a potential solution. It's great to see someone engaging with older issues. I'm glad this repository is still getting attention. I hope your own learning journey with Git and GitHub is going well. Thanks again! sght500 |
I love this course and it has taught me a lot. I feel like going back is
the key to going forward. Thank you. I look forward to learning even more.
…On Sat, Mar 8, 2025 at 11:37 AM Mario ***@***.***> wrote:
Hi Ceay44,
Thank you so much for taking the time to respond to my issue from
September! I really appreciate you looking into it and providing a
potential solution.
It's great to see someone engaging with older issues. I'm glad this
repository is still getting attention.
I hope your own learning journey with Git and GitHub is going well.
Thanks again!
sght500
—
Reply to this email directly, view it on GitHub
<#3650 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BIOOIEX6LBC3T56LPHYPSYL2TMTF5AVCNFSM6AAAAABN5VD256VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMBYGQYTANBQGY>
.
You are receiving this because you commented.Message ID:
<ibm-developer-skills-network/Centralized-repository-shipping_calculations/issues/3650/2708410406
@github.com>
[image: sght500]*sght500* left a comment
(ibm-developer-skills-network/Centralized-repository-shipping_calculations#3650)
<#3650 (comment)>
Hi Ceay44,
Thank you so much for taking the time to respond to my issue from
September! I really appreciate you looking into it and providing a
potential solution.
It's great to see someone engaging with older issues. I'm glad this
repository is still getting attention.
I hope your own learning journey with Git and GitHub is going well.
Thanks again!
sght500
—
Reply to this email directly, view it on GitHub
<#3650 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BIOOIEX6LBC3T56LPHYPSYL2TMTF5AVCNFSM6AAAAABN5VD256VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMBYGQYTANBQGY>
.
You are receiving this because you commented.Message ID:
<ibm-developer-skills-network/Centralized-repository-shipping_calculations/issues/3650/2708410406
@github.com>
--
*Christopher Williams*
Instructor Assistant - Tech Alliance
***@***.***
|
I’ve added a feature that calculates volumetric weight (length × width × height ÷ 5000) and compares it to the actual weight. The system now charges based on whichever is greater, following industry standards used by carriers. This ensures more accurate shipping costs, especially for bulkier packages. I believe this will improve cost accuracy and make the feature more reliable for users handling varied package sizes.
Please see the attached image with a snippet of the code change and a test of our new feature:
The text was updated successfully, but these errors were encountered: