https://github.com/almas-ali/sequence-validator
A math sequence validator program.
https://github.com/almas-ali/sequence-validator
Last synced: 7 months ago
JSON representation
A math sequence validator program.
- Host: GitHub
- URL: https://github.com/almas-ali/sequence-validator
- Owner: Almas-Ali
- License: mit
- Created: 2024-04-28T20:21:37.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-04-28T21:10:17.000Z (over 1 year ago)
- Last Synced: 2025-01-07T15:28:39.967Z (9 months ago)
- Language: Python
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sequence Validator
**Author:** *Md. Almas Ali*
**Date:** *29 April, 2024*I found a random statement about math at Facebook and I wanted to validate it. The statement was, "If you divide 1 by 998,001 you get all three-digit numbers from 000 to 999 in order except for 998." I wanted to validate this statement and see if it was true. I wrote a Python script to validate this statement and it was true. I have stored the value in a file for future reference. Also tested if every value is a three-digit number and if the sequence is in order. The script is in the file `sequence-validator.py`.
## How to run the script
```bash
# Clone the repository
git clone https://github.com/Almas-Ali/sequence-validator.git# Change the directory
cd sequence-validator# Run the script
python sequence-validator.py
```
**Note: You need to have Python3 installed on your system to run the script.**## Output
The output of the script is stored in the file for testing purposes. It is in `output-decimals.txt` which is raw decimal values and `output-testing.txt` which is processed value for sequence count. Your free to mess with it.
## Conclusion
The statement was true. If you divide 1 by 998,001 you get all three-digit numbers from 000 to 999 in order except for 998.
## Moral of the story
Don't believe everything you read on the internet. Always validate the information before sharing it with others.
**Math is fun!**