Skip to content

Refactored Multiple programs with error handling and input validation.#14

Open
JesusAlvarado48 wants to merge 3 commits into
Daudie87:masterfrom
JesusAlvarado48:master
Open

Refactored Multiple programs with error handling and input validation.#14
JesusAlvarado48 wants to merge 3 commits into
Daudie87:masterfrom
JesusAlvarado48:master

Conversation

@JesusAlvarado48
Copy link
Copy Markdown

Summary
This pull request updates the magic8Ball.py script to be fully compatible with Python 3 and improves the program’s overall structure, readability, and behavior. The original version contained Python 2 print syntax, a broken nested loop structure, and hard‑coded random index logic. This update modernizes the script while preserving its beginner‑friendly nature.

Why This Change Was Needed
The original script did not run correctly under Python 3 and contained logic issues that prevented the “play again” feature from functioning as intended. Since this repository is aimed at beginners, providing clean, correct, and modern examples is important for learning.

Impact
Makes the script functional under current Python versions
Improves clarity for new learners exploring the repository
Aligns with the project’s goal of offering simple, high‑quality beginner projects
Testing
Manually tested multiple question/response cycles
Verified that both “Y/y” and “N/n” inputs behave correctly
Confirmed that random responses are selected properly

@JesusAlvarado48 JesusAlvarado48 changed the title Updated Magic 8 Ball script to Python 3 and simplify gameplay flow Refactored Multiple programs with error handling and input validation. Apr 16, 2026
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