We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
A Text-Processing Warmup
A Text-Processing Warmup
Sort by
recency
|
12 Discussions
|
Please Login in order to post a comment
New to python. Here is my python 3 code. It passed all the tests.
Can anyone please share python3 code for this? need help please.
I am using python3 and its working fine in my local setup. But its throwing some list index error.Looks like it is not splitting the sentences.
Below are my sample code to split sentences into a list N = int(input()) data = input()
sentences = data.split('\n\n')
Is there any way to troubleshoot code in hackerank environment?
I solved this correctly in python-2 and got 9.88 as my score. I downloaded testcase1 and its output, and checked my result against the output, I discovered it only identified one date in paragraph 6 see pasted below. My code indentified 2 distinct dates in paragraph six i.e. July 2, 1776 and July 4.
paragraph-6: "During the American Revolution, the legal separation of the Thirteen Colonies from Great Britain occurred on July 2, 1776, when the Second Continental Congress voted to approve a resolution of independence that had been proposed in June by Richard Henry Lee of Virginia declaring the United States independent from Great Britain.[4][5] After voting for independence, Congress turned its attention to the Declaration of Independence, a statement explaining this decision, which had been prepared by a Committee of Five, with Thomas Jefferson as its principal author. Congress debated and revised the wording of the Declaration, finally approving it on July 4."
About the second test case last text chunk, I only found 2 date after read it, why the answer should be 3?