Skip to content
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

Update shipping.py with a few comments #134

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Cherry1177
Copy link

Just an extra from line 32 to the end, but the upper codes would work better with the original ones.

Just an extra from line 32 to the end, but the upper codes would work better with the original ones.
@CLAassistant
Copy link

CLAassistant commented Jul 22, 2024

CLA assistant check
All committers have signed the CLA.

if(weight<2):
g_price = weight * 1.50 + 20.00
print("Ground shipping price is : " + str(g_price))
elif(weight>2 and weight <= 6):
Copy link

@md-coops md-coops Jul 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need to check weight > 2 here as the conditional statement would terminate at the if(weight<2) step. This is why we use elif instead of a new independent if statement. With elif we don't need to re-evaluate the previous condition.

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.

3 participants