Skip to content

Conversation

@diskeu
Copy link

@diskeu diskeu commented Jan 9, 2026

Title:
Refactor Temperature Converter: Replace if-statements with dictionary mapping

Description:
This PR refactors the temperature converter by removing multiple if statements and replacing them with a dictionary-based approach.

Changes:
• Introduced a choice_Action dictionary to map user options to conversion functions.
• Simplifies adding new temperature conversions in the future.
Benefits:
• Reduces repetitive conditional logic.
• Enhances scalability for adding more temperature conversions.

@github-actions
Copy link

github-actions bot commented Jan 9, 2026

👋 @diskeu
Thank you for raising your pull request.
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.

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.

1 participant