Skip to content

Handle division by zero and invalid operation input#31

Open
dhruvatr wants to merge 1 commit into
sohailburki01:mainfrom
dhruvatr:patch-1
Open

Handle division by zero and invalid operation input#31
dhruvatr wants to merge 1 commit into
sohailburki01:mainfrom
dhruvatr:patch-1

Conversation

@dhruvatr

@dhruvatr dhruvatr commented Jun 6, 2026

Copy link
Copy Markdown

Summary

  • Prevent division by zero by raising a ValueError.
  • Validate operation input before accessing the operations dictionary.
  • Handle invalid inputs gracefully and display helpful error messages.

Testing

  • Verified division by zero is handled correctly.
  • Verified invalid operation symbols do not crash the program.

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