Sort by

recency

|

14 Discussions

|

  • + 0 comments

    Decisions are rarely black and white. Data helps cut through the noise, giving you a clearer picture of what’s really going on. Ironically, although analyzing data takes time, it can speed up decision-making in the long run. For example, if you’re thinking about buying a property in Krakow, you might want to contact Hayat Estate website . They constantly monitor the markets and provide their clients with only the most up-to-date information.

  • + 0 comments

    While no one has a crystal ball, data can be the next best thing. Historical data, patterns, and trends help forecast future outcomes, allowing businesses and individuals to anticipate what’s coming and plan accordingly.

  • + 0 comments

    New to python. Here is my python 3 code. It passed all the tests.

    import re
    
    num = int(input())
    
    for i in range(num):
        line = input()
        line = re.sub('[^\w\s]', '', line)
        tokens = line.lower().split(' ')
        print(tokens.count('a'))
        print(tokens.count('an'))
        print(tokens.count('the'))
        pattern1 = '\d{2}/\d{2}/\d{4}'
        match1 = re.findall(pattern1, line)
        pattern2 = '\d{2}/\d{2}/\d{2}'
        match2 = re.findall(pattern2, line)
        months = '(January|Feburary|March|April|May|June|July|August|September|October|November|December|Jan|Feb|Mar|Apr|May' \
             '|Jun|Jul|Aug|Sep|Oct|Nov|Dec)'
        days = '(0?[1-9]|[1-2][0-9]|30|31|1st|2nd|3rd|[4-9]th|[1-2][0-9]th|30th|31st|21st|22nd)'
        pattern3 = days + '\s' + months + '(\s)(\d{4}|\d{2})'
        pattern4 = months + '\s' + days + '(\s)(\d{4}|\d{2})'
    
    	match3 = re.findall(pattern3, line)
    	match4 = re.findall(pattern4, line)
    	print(len(match1) + len(match2) + len(match3) + len(match4))
    
    	if i < (num-1):
    			input()
    
  • + 0 comments

    Can anyone please share python3 code for this? need help please.

  • + 1 comment

    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?

    • + 0 comments

      I put a loop and it worked.Thanks.