Skip to content

Fix/sanitize#226

Open
jonahgigi534-wq wants to merge 6 commits intoMIT-BWSI-CSS:mainfrom
jonahgigi534-wq:fix/sanitize
Open

Fix/sanitize#226
jonahgigi534-wq wants to merge 6 commits intoMIT-BWSI-CSS:mainfrom
jonahgigi534-wq:fix/sanitize

Conversation

@jonahgigi534-wq
Copy link

Sanitized user input for numbers

return float(input(prompt))
except ValueError:
print("Invalid input. Please enter a valid number.")

Copy link
Author

Choose a reason for hiding this comment

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

Comment on error handling

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