Computer Science, asked by jeevadathi, 3 months ago



In the “Paragraph words” dataset, the procedure CountLongNouns counts the number of nouns that are longer than the average word length. Assume that the variable Avg holds the value of average word length. Choose the correct choice to complete the procedure.



if (X.LetterCount > Avg) {

Count = Count + 1
}

if (X.PartOfSpeech == “Noun”) {

Count = Count + 1
}

if (X.LetterCount > Avg or X.PartOfSpeech == “Noun”) {

Count = Count + 1
}

 if (X.LetterCount > Avg and X.PartOfSpeech == “Noun”) {
Count = Count + 1
}

 None of the above

4 points

The following pseudocode is executed using the “Scores” dataset. What will be the value of the variable Z at the end of the execution? [Note: Consider only two decimal places in all division operations.]



 -1

 0

 +1

 None of the above

3 points

The following pseudocode is executed using the “Scores” table. At the end of the execution, the variable CountBA captures the number of students with total marks less than average total marks and below average in exactly one subject. Assume that the variable AvgT holds the value of average total marks. Similarly, the variables AvgP, AvgC and AvgM hold the value of average marks of Physics, Chemistry and Mathematics respectively. Choose the correct choice to complete the pseudocode.



if (SubC ≤ 1) {
CountBA = CountBA + 1
}

if (SubC ≤ 1) {

CountBA = 1
}

if (SubC == 1) {

CountBA = 1
}

if (SubC == 1) {

CountBA = CountBA + 1
}

4 points

The following pseudocode is executed using the “Shopping bills” dataset. What will the values of the variables A and B represent at the end of the execution?





A = Number of bills with total bill amount less than the average total bill amount

B = Number of bills with total bill amount greater than the average total bill amount

A = Number of bills from “Big Bazaar” with total bill amount greater than the average total bill amount of “Big Bazaar”

B = Number of bills from “SV Stores” with total bill amount less than the average total bill amount of “SV Stores”

A = Number of bills from “SV Stores” with total bill amount less than the average total bill amount of “SV Stores”

B = Number of bills from “Big Bazaar” with total bill amount greater than the average total bill amount of “Big Bazaar”

 A = Number of bills with total bill amount greater than the average total bill amount
B = Number of bills with total bill amount less than the average total bill amount

4 points

The following pseudocode is executed using the “Scores” dataset to grade the students by total marks. Also, the pseudocode counts number of male students in each grade. But the pseudocode may have mistakes in one or more lines. Identify all such lines (if any). It is a Multiple Select Question (MSQ).



 Error in Line 1

 Error in Line 19

 Error in Line 20

 Error in Line 23

 Error in Line 26

 Error in Line 30

 No error



Answer the questions 6-9 using the given information:

The following pseudocode is executed using the “Shopping bills” dataset. Let MinT be a variable that holds the value of the minimum total bill amount. What will be the values of A, B, C and D at the end of the execution?



The value of A is ________

1 point

The value of B is ________

1 point

The value of C is ________

1 point

The value of D is ________

1 point


3 points

The following pseudocode is executed using the “Shopping bills” dataset to find the number of eligible bills for top three total bill amounts. Choose the correct code block to complete the pseudocode.



 if (X.TotalBillAmount < ThirdT) {
Count = Count + 1
}

if (X.TotalBillAmount ≥ FirstT) {

Count = Count + 1
}

if (X.TotalBillAmount > ThirdT) {

Count = Count + 1
}

 if (X.TotalBillAmount ≥ ThirdT) {
Count = Count + 1
}

 None of the above

3 points

The following pseudocode is executed using the “Shopping bills” dataset. What will the values of A, B and C represent at the end of the execution?



 Maximum total bill amount of each customer

 Maximum total bill amount of each shop

 Shop name of the bill with maximum total bill amount

 Maximum total bill amount

6 points

The following pseudocode is executed using the “Paragraph words” dataset. At the end of the execution, CountB captures the number of verbs with letter count less than the average letter count of verbs. But the pseudocode may have mistakes in one or more lines. Identify all such lines (if any). It is a Multiple Select Question (MSQ).



 Error in Line 4

 Error in Line 8

 Error in Line 11

 Error at Line 12

 Error in Line 17

 Error at Line 18

 Error in Line 21

Answers

Answered by bhch0905
2

Explanation:

Hi

I don't understand your question

Answered by RASHIDTE
28

Answer:

Q.In the “Paragraph words” dataset, the procedure CountLongNouns counts the number of nouns that are longer than the average word length. Assume that the variable Avg holds the value of average word length. Choose the correct choice to complete the procedure.

A. if (X.LetterCount > Avg and X.PartOfSpeech == “Noun”) {

Count = Count + 1

Q.The following pseudocode is executed using the “Scores” dataset. What will be the value of the variable Z at the end of the execution? [Note: Consider only two decimal places in all division operations.]

A.-1

Q.The following pseudocode is executed using the “Scores” table. At the end of the execution, the variable CountBA captures the number of students with total marks less than average total marks and below average in exactly one subject. Assume that the variable AvgT holds the value of average total marks. Similarly, the variables AvgP, AvgC and AvgM hold the value of average marks of Physics, Chemistry and Mathematics respectively. Choose the correct choice to complete the pseudocode.

A.if (SubC == 1) {

CountBA = CountBA + 1

}

Explanation:

Similar questions