Commit Graph

4 Commits

Author SHA1 Message Date
Pat Wick b3e386cdff just a couple of tweaks to the test cases 2023-08-09 12:25:35 -04:00
Pat Wick 9538db68d7 completed numberwords.py and added negatives
I completed numberwords.py, modeled after the solution that I accidentally had access
to, but I did fix a few output issues where things were printing awkwardly (thiry-zero)
so now things look to work a little more like they would be said in English. I also
(after MUCH planning, execution, debugging, and throwing it all away to start over)
came up with a way to get the negative numbers to work. I did this by converting
the original number to a string, checking if the first character is a dash, throwing
away the dash if it exists, and then completing the rest of the program as if the number
were positive. I added some conditionals and a boolean value to only print the "negative "
string on the most parent function so it doesn't end up saying something like
"negative negative fiften thousand negative four hundred and negative thirty-five", and
it seems to work for all of the numbers that I tested. It doesn't work well with
test_numberwords.py because the test cases have the tens index shifted. I guess I could
have just modified those and ran it again. I should do that.
2023-08-09 12:16:40 -04:00
Pat Wick d8a5934cb5 modified planning.md to set up design
I'm not sure if I grabbed this early or not, but there are no specific questions
to answer on this file. If there is anything specific to answer for checkpoint 1 or
the overall submission, just let me know and I'm happy to resubmit.

As far as planning for numberwords, I think it'll be useful to convert the number
to a string right off the bat then just find the length and use that to determine
how many numbers we have (and whether it's negative) and what index each digit is
located in. It seems pretty straightforward, so I'm hoping the follow-through is
what I think it is.
2023-08-07 10:03:50 -04:00
pwick 01865afe8c Initial commit 2023-08-06 18:32:26 +00:00