Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

UiPath-ADPv1 Exam - Topic 4 Question 50 Discussion

Posted by Annice on Jan 26, 2026 at 10:10 AM

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

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.Reference: [DataTable.AsEnumerable Method], [Enumerable.SkipWhile Method], [DataRow.Item Property]


Get Premium UiPath-ADPv1 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
32 comments · newest first
EL
Elroy 2 months ago
It adds up to 15, trust me!
TR
Truman 2 months ago
But what about the second row?
GR
Graham 2 months ago
The qty from the first row is 10.
JO
Johnetta 2 months ago
10? How did you get that?
GR
Graham 3 months ago
I believe it should be 10.
TR
Truman 3 months ago
I feel unsure about that.
EL
Elroy 3 months ago
Because it's the sum of the first two rows.
JO
Johnetta 3 months ago
Why 15?
EL
Elroy 3 months ago
I think it will be 15.
TE
Terry 4 months ago
I don't think that's right, double-check the logic!
CE
Celestina 5 months ago
Yup, it's based on the sum of the values.
SH
Sharee 5 months ago
Wait, are we sure about that?
AR
Arlen 5 months ago
Totally agree, that makes sense!
GE
Geraldo 6 months ago
The qty variable will be 15.
AS
Ashleigh 6 months ago
Wait, is this a trick question? I'm going to go with 15 for the value of qty, but I'm not 100% sure.
SE
Selma 6 months ago
This is a piece of cake! The value of qty will be 15 because the Assign activity is adding up all the values in the qty column.
IS
Isabella 6 months ago
I'm pretty sure the value of qty will be 15. The Assign activity is clearly designed to add up all the values in the qty column.
LU
Lucina 6 months ago
Haha, this is a trick question! The value of qty will be 15 because the Assign activity is summing up all the values in the qty column.
LI
Lilli 6 months ago
Hmm, I think the value of qty will be 10. The Assign activity seems to be adding the values in the qty column.
MO
Monroe 7 months ago
The value of the qty variable will be 5 after executing the Assign activity.
LA
Lauryn 7 months ago
I think the qty variable should reflect the quantity from the specified row, but I can't recall which row it was supposed to reference.
MY
Myra 7 months ago
I feel a bit confused about how the Assign activity works with data tables. Did we cover if it uses zero-based indexing?
BE
Benedict 8 months ago
I remember a similar question where we had to extract values from a data table. I hope I can apply that here.
FR
Franchesca 8 months ago
I think the qty variable will be the value from the first row, but I'm not sure if it should be the first column or the second.
ST
Stanton 8 months ago
Okay, let me break this down step-by-step. The table has three columns, and the Assign activity is referencing the Qty column. I'll need to carefully examine the table structure and the activity to determine which row the value is being pulled from.
NI
Nikita 8 months ago
I've got this! The Assign activity is referencing the Qty column, so the value of the qty variable will be the value in the Qty column for the row that matches the current context. I just need to make sure I've identified the correct row.
LO
Louisa 8 months ago
I'm a bit confused by the table structure and how the Assign activity is referencing the data. I'll need to review the table and the activity closely to make sure I understand how the value is being calculated.
MA
Martha 9 months ago
Okay, let me think this through step-by-step. The table has three columns - Product, Qty, and Price. The Assign activity is referencing the Qty column, so I just need to figure out which row it's pulling the value from.
GO
Goldie 9 months ago
Hmm, this looks like a straightforward data manipulation task. I'll need to carefully examine the table structure and the Assign activity to determine the value of the qty variable.
GA
Galen 1 month ago
↳ replying to Goldie
It depends on the condition in the Assign activity. Let's double-check!
LO
Lonna 2 months ago
↳ replying to Goldie
Are you sure? I thought it would be 5.
GU
Gussie 2 months ago
↳ replying to Goldie
I think the qty variable will end up being 10.
0/2000 characters

Save Cancel