As in the title I made a program with check, if in lines of text are double words and at the end the number of lines without double words is displayed.
This is a sample text:
sayndz zfxlkl attjtww cti sokkmty brx fhh suelqbp xmuf znkhaes pggrlp zia znkhaes znkhaes nti rxr bogebb zdwrin sryookh unrudn zrkz jxhrdo zrkz bssqn wbmdc rigc zketu ketichh enkixg bmdwc stnsdf jnz mqovwg ixgken
I have already created a program, and it looks like the program is working. However, I am aware that when programming works, it does not mean that the program has been created properly.
Class SkyphrasesValidation (Object): def get_text_file (self): File = open (& # 39; C: /Users/PC/Documents/skychallenge_skyphrase_input.txt' ;, & # 39; r & # 39; Return file def lines_list (self): text = self.get_text_file () line_list = text.readlines () return [line.split() for line in line_list] def phrasen_validation (self): validated_phrases = 0 for line in self.lines_list (): new_line =  for word in line: Check = number of lines (word) if test> 1: new_line.append (0) otherwise: new_line.append (1) if 0 in new_line: validated_phrases + = 0 otherwise: validated_phrases + = 1 returns validated_phrases def __str __ (self): return str (self.phrases_validation ()) text = SkyphrasesValidation () print (text)
Is my logic good and this program is well done, or maybe it looks like shit and I could make that clearer.