in Technology by

What does the following code denote about index updation?

for (index in 1:3) {
index <- index * 2
print(index)
}

1 Answer

0 votes
by
In a for-loop the index is updated at the beginning of each iteration. Therefore, reassigning the index symbol during one iteration doesn’t affect the following iterations.

Related questions

0 votes
    You are working with this XML code snippet from the XML document cars.xml. You need to return the information about the cars ... D.doc("cars.xml")/cars/car[integer(year) > 2000]...
asked Mar 10, 2023 in Technology by JackTerrance
0 votes
    The first part of index.Rmd is XML code. (a) True (b) False...
asked Oct 9, 2021 in Technology by JackTerrance
0 votes
    The first part of index.Rmd is XML code. (a) True (b) False I had been asked this question ... questions and answers pdf, Data Science interview questions for beginners...
asked Oct 28, 2021 in Education by JackTerrance
0 votes
    Which one is true about clustered index? (a) Clustered index is not associated with table (b) Clustered index ... SQL topic in division Indexing and Hashing of Database Management...
asked Oct 10, 2021 in Education by JackTerrance
0 votes
    Which is use to denote type of data plotted in a chart a) data series b) chart Area c) chart title d) Axes title Select the correct answer from above options...
asked Dec 20, 2021 in Education by JackTerrance
0 votes
    If page size of 1MB memory is 1 KB then the number of higher order bits of address bus used to denote page number is ( ... (c) 12 (d) 9 Select the correct answer from above options...
asked Dec 17, 2021 in Education by JackTerrance
0 votes
    Let X denote the sum of the numbers obtained when two fair dice are rolled. Find the variance and standard deviation of X. Select the correct answer from above options...
asked Nov 25, 2021 in Education by JackTerrance
0 votes
0 votes
    A fair die is tossed repeatedly until a six is obtained Let X denote the number of tosses required The probability that ... D. 125 216 Select the correct answer from above options...
asked Nov 16, 2021 in Education by JackTerrance
0 votes
    A fair die is tossed repeatedly until a six is obtained Let X denote the number of tosses required The probability that ... 125)/(216)` Select the correct answer from above options...
asked Nov 13, 2021 in Education by JackTerrance
...