Skip to content

Conversation

@angeladevhub
Copy link

This is my Magic 8-Ball project for the Learn Python course.
I combined the name and question handling using if, else, and elif statements to make the output cleaner and more flexible.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

In my version of the code, I created a variable called flat_charge at the top of the program instead of adding + 20 in every line of the Ground Shipping calculation.

This approach makes the code:

Cleaner and easier to read – the flat charge is clearly defined once, rather than repeated.

Easier to update – if the flat charge ever changes (for example, from $20 to $25), it only needs to be updated in one place.

More maintainable – helps prevent typing mistakes or inconsistencies if the same value appears multiple times.
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