code works but confused on how it's verified

Alphabetize

monarch
5 years ago

0

So, I understand that I have to click “Submit” to get a set of fresh words to sort. I sort them fine and put them in the answer box. Even when I get the sorted list back in the answer box before the time runs out, it doesn’t recognize my list or am I supposed to hit submit again? I’m a little confused on how I “submit my list.”

13replies
5voices
244views
Psyberion
5 years ago

0

The answer won’t be evaluated until you hit “Submit”, so that’s quite a vital step in the process. If you’re unsure how to do it from code, look up what actually happens when you submit a form on a webpage and see how you can make that happen with your language of choice.

Darwin [DIDIx13]
5 years ago

0

[quote=monarch] Am I supposed to hit submit again?[/quote]

Why don’t you just try?

monarch
5 years ago

0

@DIDIx13 I have tried. I went back to try again. Sometimes I have a second and a half left when my answer is posted in the answer box and I hit submit. I’ll try something else to submit the answer within my code, I guess. I’ll keep working it.

monarch
5 years ago | edited 5 years ago

0

Made my code press the submit button with 2.2 seconds left and it still says “incorrect answer” :( There must be a specific way it wants you to submit the answer, I guess.

Smyler [WHGhost]
5 years ago

0

Unless you have a very laggy network, yes your answer is not formated correctly.

Psyberion
5 years ago

0

Yes, it does sounds like you’ve done something wrong. Do it by hand once, and compare that with the output of your code.

monarch
5 years ago

0

UPDATE - I verified by hand, it looked correct. I worked on a script that sort and insert the list into the answer box. It would then tab to the submit button and press enter to submit the list. I’m giving up on that method as it doesn’t seem to work. However, I’m using this as a chance to work with the Requests Python Library. It will take a little longer having to learn to use the library but it will ultimately pay off more as it’s reproducible on other machines - not just mine.

dloser
5 years ago

0

There is nothing wrong with the method, there is something wrong with the way you are doing it. It’s ok to try it in Python, but figuring out why something isn’t working as you expect is also very important. If you don’t, you risk encountering the exact same issue with Python. And at some point you’ll run out of languages to try… ;)

The most common issues are the the result isn’t actually 100% sorted or that there is a whitespace problem. If you really think the code you have should work, you can always verify it with someone that has already solved it.

Smyler [WHGhost]
5 years ago

0

I can have a look at your python code if you want, @monarch , just PM me.

monarch
5 years ago

0

@dloser and @whghost thanks for the insight and help. Ill look at my results closer. @whghost i havent weitten the puthon code yet. When i do Ill send it tour way if it doesnt work.

monarch
5 years ago

0

My current code is in bash. If someone wanted to check my script, that could help.

dloser
5 years ago

0

Feel free to PM me the script.

monarch
5 years ago

0

Thanks for the help @dloser and @whghost! I finally got the formatting correct. From my bash script, there was an extra carriage return at the end and I found that the last word initially din’t have a comma in the end. The carriage return took me a while.

Discussion thread has been locked. You can no longer add new posts.
1 of 14

This site only uses cookies that are essential for the functionality of this website. Cookies are not used for tracking or marketing purposes.

By using our site, you acknowledge that you have read and understand our Privacy Policy, and Terms of Service.

Dismiss