Skip to content

CT Week 5 Graded Assignments IIT Madras

 

Computational Thinking week 5 graded assignment Complete  Solutions Are Discussed In This Blog. We Hope This Might Help You All In Matching Answers . Or For Some Others Reasons If Not Able To Complete Graded Assignments 

1. What will be the value of mList at the end of the execution of the given pseudocode?

 
 
 

 

 

[0, 210, 1, 198, 2, 188, 3, 173, 4, 240]

[0, 1, 2, 3, 4]

[[0, 210], [1, 198], [2, 188], [3, 173], [4, 240]]

[210, 198, 188, 173, 240]

 
2 points
 

 

2.What will be the value of mList at the end of the execution of the given pseudocode?


 
 
 

 

 

[0, 210, 1, 198, 2, 188, 3, 173, 4, 240]

[0, 1, 2, 3, 4]

[[0, 210], [1, 198], [2, 188], [3, 173], [4, 240]]

[210, 198, 188, 173, 240]

 
 

3.Let N be a list of first 50 positive integers (i.e., N = [1, 2, 3, ……, 49, 50]). What will be the value of count at the end of the execution of the given pseudocode? (NAT)

 
 
 

 

 
3 points

 


Question (4-5)

Consider the procedure given below. If L1 and L2 are two lists, and L = eliminate(L1, L2), then answer the following questions.


 
 
 
 
4 points

4.Choose the correct options(s) regarding L. It is a Multiple Select Question (MSQ).

It will contain all the elements of L2 that are not present in L1

It will contain all the elements of L1 that are not present in L2

It will contain all the elements common to L1 and L2

It will contain the elements present in L1 or L2 but not both

 
3 points

5.Which of the following condition(s) is/are always True? It is a Multiple Select Question (MSQ).

length(L1) – length(L2) = Length(L)

length(L1) > length(L2)

length(L1) >= length(L)

length(L2) <= length(L)

 
5 points

6.A word is said to be perfect if no letter is repeated. Let isPerfect be a procedure that takes a row X in the “Words” table as input and returns True if the word in row X is a perfect word otherwise returns False. Choose the correct implementation of the procedure isPerfect.

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

7.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 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 be the value of posSen at the end of the execution of the above pseudocode? 

 

 
5 points
 
6 points
 

8.Mona tells Sona that at least 50 percent of sentences have nouns just after an adjective. Sona writes the following pseudocode to find if Mona is right or not. At the end of the execution of the pseudocode given below, A stores True if Mona is right otherwise False. But Sona might have made mistakes in one or more lines. Identify such lines (if any). It is a Multiple Select Question (MSQ). Assume that there is at least one adjective in every sentence.

 
 
 

 

 

Line 4: Invalid addition operation for appending in posList

Line 7: Invalid increment of trueCount

 

Line 9 – 11: These three lines should be replaced by

 
 
 

 

 
 

Line 26: The current statement should be replaced by

 
 
 

 

 

No mistakes

 

QUESTION 9-10

Let a and b be positive integers. Procedure remainder(a, b) returns remainder if a is divided by b.

 
 
 

 

 
5 points

9.When will procedure doSomething(X) return True?

X is a prime number

X is an even number

X is an odd number

X is more than 1

 
5 points
 

10.Consider the procedure discussed above. What will be the value of M at the end of the execution of the given pseudocode below?

 
 
 

 

 

= [11, 7]

= [11, 23, 7]

= [11]

= [23, 7]

WhatsApp
Telegram
Print
Facebook

2 thoughts on “CT Week 5 Graded Assignments IIT Madras”

Leave a Reply

Your email address will not be published. Required fields are marked *