Questions tagged as 'loop'

3
answers

Request n entries in python

I am having difficulty in this exercise: "Make a program that asks n people their age, at the end the program should check if the average age of the class varies between 0 and 25, 26 and 60 and greater than 60, and then say if the class is "y...
asked by 11.11.2017 / 23:55
1
answer

Doubt about the echo within a loop

I have this code for an API test and I wanted every loop end to write it on the script progress screen in%, but it only shows when it finishes doing everything, is there any way to make it work? . <?php require __DIR__ . '/vendor/autoload.p...
asked by 20.01.2018 / 03:29
2
answers

Doubt with repeat loop

I'm doing a series of exercises in PHP for practice. And I came across a question regarding loop repetition. To explain it better I'll put the exercise statement here: Efetue um algorítmo PHP que receba dois valores quaisquer e efetue sua mult...
asked by 22.05.2017 / 20:14
1
answer

Simple question about for loop

I have 4 images: one image over the other within div . It is over each other because it is in absolute position. I would like to make a simple slideshow , just to learn its basic operation inside a loop . What's wrong with the cod...
asked by 07.06.2016 / 00:37
2
answers

Add option to select with jQuery through $ .post callback

I am making a select that will have some users and when selecting a user will send a request $.post to get all records related to the selected user. After returning the related records, the jQuery will return the callback...
asked by 07.10.2014 / 06:03
1
answer

Foreach with Lambda does not work

I have a list of objects that I want to go through, but it is giving error and I am not understanding why: listaAtendimento.stream().forEach(atendimentoFicha -> { fichaAtend.getAtendimentosIndividuais().add(getAtendIndivC...
asked by 12.11.2015 / 11:32
2
answers

How to ask questions for the user in Python, without running constantly?

I'm creating a Python code that requests the nick of a player and, as the user responds, it will receive a response, player = (input('Digite o nick desejado:')) if player == 'Phil' : print('Player encrenqueiro,nível de habilidades:razoáv...
asked by 23.03.2018 / 21:59
3
answers

Loop in R with indexing and array

We are trying to use the for command to run a function y (say y=5+3x+4z ) by varying the values of z (say that z is a combination of 5 z=c(1,2,3,4,5) ) and that x is a normal size distribution 1000. After printing the values w...
asked by 29.03.2014 / 22:06
1
answer

Loop "for" counted odd number, even and averaging

I need to make a code that: List a number of numbers Inform if they are divisible by 3 and 5 If they are even or odd And then take the separate mean of each (average of odd and average pairs) I made a code, but when it does the aver...
asked by 03.10.2017 / 04:23
1
answer

Delete list item if directory does not exist

I have a list containing the path of some directories, I want to check if each directory exists, for that I use os.path.exists() , if a directory does not exist, I use the remove() method to remove it from the list, looping for...
asked by 26.07.2016 / 16:11