Question: I'm trying to hide/open the angular material dropdown menu.

treps.html

```
<mat-form-field>
          <mat-select  #color formControlName="colors">
            <mat-option value=''></mat-option>
            <mat-option [value]="color" *ngFor="let color of colors"> {{color}}
            </mat-option>
          </mat-select>
<mat-form-field>

<button (click)="onClick()">Hide/Open</button>

```

treps.ts

```
  @ViewChild('color') color

  onClick() {
   this.color.hide()   // Error appears in the console,stating hide is not a function
 }

```

I tried checking the all properties but couldn't hide the dropdown.

Answer: 
You need to remove the new line character at the end of every word, since you're reading them from a file. And at the end, you still have the original word, so there's no need to parse the lines for it again.

You can make these changes:

```
word = random.choice(lines).strip()

...

if ans == word:
    print("correct")
else:
    print("incorrect")

```
I think the issue is with the lop at the end.
You may be searching with the entire line as a word. May be you can share a hard coded example of your input? (lines)

Any way, i have modified it a bit and it works

```
import random
words = ["cat","dog","bird"]
word = random.choice(words) # picks a random word 

convertWord = list(word) # Converts it to a list

random.shuffle(convertWord) # Shuffles the list

print("Your word is: ",''.join(convertWord)) # joins the list into a string
ans = str(input("Unscramble! "))

if ans == word: # checks if answer is correct
  print("correct")
else:
  print("incorrect")

```

Now you need to figure out how you want to fill "words" :)