Q14Numerical5 Marks1 Sep 2024
The given pseudocode is executed using a dataset having the same fields as the "Words" dataset, and contains the following words:
"I ordered this product from Gitark. I am very happy to share my review regarding this awesome product. It is not only nice to use, but also has a very cool look. I think this is the best and the most awesome product which can be bought in this price range."
Consider the following information:
1. unique(L) returns a list of unique elements of list L. For example unique(["think", "like", "toppers", "think"]) will return ["think", "like", "toppers"].
2. comNo(L1, L2) returns the number of common elements in lists L1 and L2.
3. Ignore the upper and lower case, and punctuation symbols while comparing with other words.
What will the value of posSen be at the end of the execution of the above pseudocode?
```
positiveList = ["happy", "awesome", "nice", "fine", "best", "cool"]
posSen = 0, L = []
while(Table 1 has more rows){
Read the first row X in Table 1
L = L ++ [X.Word]
if(X.Word ends with full stop){
L = unique(L)
posCount = comNo(positiveList, L)
if(posCount >= 2){
posSen = posSen + 1
}
L = []
}
Move X to Table 2
}
```
Press Enter to check.