loop

Show an object / variable with different names in R?

Considering the following routine: x <- 1:10 for (i in 1:length(x)) { ## Nome da variável: nomevar <- paste0("Var_", i) var <- x[i] + 2 assign(nomevar, var) print(nomevar) # aqui esta minha duvida }

Algorithm factorization in C

I need to create a program in C, which factors any number the user enters. I wrote this code, but it doesn't fully work as it ... printf("%i |%i=%i", num, i, resp); } } if(resp==1) break; } return 0; }

Autofill cells in excel using VBA

Good afternoon Community, I am trying to work with VBA in Excel to try to apply this knowledge in my master's thesis, but I ... ne camera, I'll probably get to other cameras of different areas and placed at vertices different. Thank you for helping me.

Using for not Python

In Python can only work with the ' for ' (loop) using a list? Is not possible only with an integer as in other languages?

How can I create mathematical sequence and series functions in python?

How can I make the interpreter understand what is the previous value of a mathematical function, such as: "Xn = 3.7 (xn-1)" w ... this is nothing less than a mathematical sequence and series, but I wanted to apply to python to solve mathematical problems.

Save data inside a looped vector in Python

Good afternoon guys. I've been learning a lot of C and C++, and the python part too. It confuses me a lot the syntaxes someti ... ite o nome do aluno: ") i+=1 while i<len(estudantes): print("Aluno {}: {}".format(i, estudantes[i])) i+=1

Brute force algorithm for solving Sudoku game in C

I have the following code written in C: #include <stdio.h> #include <stdlib.h> #include <time.h> // Vari ... his way the program enters an infinite loop (so the two lines are commented). How to solve this and fill the board correctly?

When to use recursion and when to use loops?

A problem can be solved and get the same result used a loop or through recursive calls to a function. Considering that the programming language being used has both features, How do you know when one is better than the other?

How do I loop to send my emails?

I'm trying to get the code to pick up the emails I'm going to put in a list .txt or in a form (while I do not mount the datab ... agem enviada !"; } $mail->clearAllRecipients(); // Limpa o campo de para quem o email será enviado e o nome } ?>

Is it possible to use for loop to reduce code in C?

I have the following function: to . Is it possible to use for loop B to generate the statements as in function a ? What to ... EPROM_MASK(buf, EEPROM_A"; char ad2[]="));"; for (i=15; i>=0; i--) { printf("%s%i%s\n",ad1,i,ad2); } }

Doubts C++ do-while loop

Good people, I have the following Question: Every time I scratch this program The Do-While loop does not stop in the scanf ... printf("Opcao invalida"); } }while((op!='s') && (op!='n')); }while(op!='n'); return 0; }

Repeat loop in C

Hello, I am a beginner in programming and I have a question: I am making a program that has a menu and a registration to be c ... e program menu always appear after you finish the registration, instead of ending the program. Will I use while or of while?

Why are loops slow in the R? How to avoid them?

It is very common to hear (or read) that loops are not efficient in Rand should be avoided (in this link or in another link o ... 26 100 The questions I ask are: why are loops slow in r ? what alternatives are there? (packages, strategies, etc.)

What is the difference between while, for, from while and foreach?

What is the difference between the while , do while, for and foreach in PHP, because they give the impression that has the s ... ity . Can all of them be used to create a loop or have other purposes? How would a simple example of using each look like?

Python-problem doing print inside a loop

I have the following code Python, representative of the game Pedra,Papel,Tesoura. import random listChoices = ["rock","paper ... addition to executing the block that is inside while, it also prints the error message described above. Thank you right now.

Looping jquery setInterval

I'm making a slider and I need that when the images finish passing, they start again but I'm not getting it. Could anyone hel ... al(moveLeft, 3000); } function clearLoop(){ clearInterval(interval); } }); // End of main function

Traversing enum values in C

Do you have any way to go through the values of Enum in C and display in the format string , as in Java, C# and other languages?

Displaying certain vectors in a Python 2D list

I have the following situation: - I have a variable called (vetor_distances). This variable receives a 2D list with multiple ... i) if i <= 100 print (fitness[i]) return fitness print (funcao_fitness()) Right now, grateful for the help.

What are the differences between repeat structures while, repeat and for?

Friends, I'm learning programming logic and came this doubt when I should use these commands and their differences.

C - multiplication language algorithm

Translate to the C language: take a number by the keyboard and repeat the operation of multiplying it by three (printing t ... { if(aux<=100) { aux=num*i; printf("%i\n", aux); } } return 0; }