Questions tagged as 'loop'

1
answer

Array always receiving the same value [Loop in two arrays simultaneously]

My program traverses an image and assigns the color values R, G, B to variables that were compared to matrices containing the R, G, B colors of asphalt and earth called auxAsfalto and auxTerra . The question is: when I run the i...
asked by 02.01.2019 / 13:44
1
answer

While in Python Timer

How to make a timer while? I would like to execute a while, and do something, eg. a print "hello" run "hello" print for 1 hour for example.     
asked by 19.06.2016 / 19:29
1
answer

I can not run code after the loop is [closed]

I'm using selenium as a crawler on a website. I have no experience with python. Here I create a dataframe with the data of a .csv df = pd.DataFrame.from_csv( 'tabela_etickets_copa3.csv', columns = header ) I open the b...
asked by 13.05.2015 / 20:27
2
answers

Passing a variable within a procedure

I have this procedure in my project procedure DocumentComplete(ASender: TObject; const pDisp: IDispatch; const URL: OleVariant); Now I need to use it in a loop by passing the count variable. I tried the following: procedure DocumentComple...
asked by 08.11.2016 / 22:16
3
answers

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

I have the following function: A . Is it possible to use the B for loop to generate declarations as in the A function? What to use instead of printf to become a declaration? printf("%s%i%s\n",ad1,i,ad2); A void functionX(unsigned...
asked by 20.06.2017 / 08:58
2
answers

Loop with "for" in a form with equal field sets

I have a data capture of a form where fields are 5 sets of equal fields. I want at the time of capturing for my array, I do not need to repeat: array[1] = post1, array[2] = post2 I know you can use a for : for ($i=1;$i<=5;$i++) {...
asked by 20.09.2014 / 01:24
2
answers

Optimization of several ifs in something more practical

I have a string of alphabetic characters: char string[] = "aouihuiahsudasduihqmdoiqjnduiamsdoqnwuidamodkjwodkaposdj"; I want to go through it and for each character of it, say how many times it repeats itself in string . Example: #i...
asked by 04.07.2017 / 02:07
8
answers

I can not learn syntax for

I can learn subjectively for a few seconds, but I can not fix it no matter how hard I try. I've done classes, I've done exercises and everything, but the syntax and variations just do not fix it for me. For example, if I do: for(var i=0; i&...
asked by 24.09.2014 / 05:02
2
answers

Loop is not repeating as it should

I am creating a code that reads the number entered by the user and, if it is from 1 to 10, he / she performs the table, presenting value by value on the screen, and allows the user to choose whether to check another table. The first time, it...
asked by 14.07.2017 / 19:51
1
answer

ATM simulator

I am starting to put together a program that simulates an ATM with 3 banking options and an option for the user to terminate the process. But after the user-made operation, I tried to use the multiple decision command switch case w...
asked by 15.12.2018 / 20:25