Exam UiPath-ADPv1 Topic 3 Question 169 Discussion

Actual exam question for UiPath's UiPath-ADPv1 exam
Question #: 169
Topic #: 3
The following table is stored in a variable called "dt".

What will the value of the qty variable be after executing the Assign activity?

Suggested Answer: C Vote an answer

The value of the qty variable will be 80 after executing the Assign activity. This is because the expression in the Assign activity is using the LINQ methods AsEnumerable, SkipWhile, and Item to access the data in the dt variable. The dt variable is a DataTable that contains the following data:
Item
Quantity
apple
5
banana
10
mango
20
orange
80
grape
40
The AsEnumerable method converts the DataTable into an Enumerable collection of DataRow objects. The SkipWhile method skips the elements of the collection until the condition is false. The condition is a lambda expression that checks if the value of the Item column is equal to "mango". The (0) indexer returns the first element of the collection after skipping. The Item method accesses the value of the Quantity column of the DataRow. The ToString method converts the value into a string. Therefore, the expression will skip the first three rows of the DataTable and return the value of the Quantity column of the fourth row, which is
80. References: [DataTable.AsEnumerable Method], [Enumerable.SkipWhile Method], [DataRow.Item Property]

by rajashri.gudi at Apr 11, 2025, 10:31 PM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
rajashri.gudi
2025-04-11 22:31:36
Answer is 10. quantity of first(0) row of dt which does not contain mango
upvoted 1 times
...
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

Contact Us

If you have any question please leave me your email address, we will reply and send email to you in 12 hours.

Our Working Time: ( GMT 0:00-15:00 ) From Monday to Saturday

Support: Contact now 

日本語 Deutsch 繁体中文 한국어