Questions tagged as 'lista'

1
answer

User type 15 random numbers, program returns average, numbers larger than average and smaller than average!

num = [] soma = 0 media = 0 for i in range(1, 16): num = int(input('Digite um número: ')) soma += num media = soma / 15 if num[i] > media: print('Maires que a media {}'.format(num[i])) if num[i] < media:...
asked by 02.01.2019 / 21:09
2
answers

Chained List - remove function

I'm programming a headless threaded list, in this program there is a remove function that aims to delete all repeated integers in a list, px: by taking the values 8 2 8 3 8 the function has to return 2 3, however this function apparently looped...
asked by 27.10.2016 / 15:09
3
answers

Change marker color li

Hello I would like to know how I can change the color of the marker ball <li> via CSS. For what I read on the internet, so far I've only been able to do this using an image to replace the ball.     
asked by 26.02.2016 / 18:30
1
answer

get the values from a Listt generic list

My Winforms C # project has a form with a GridControl(gvDados) component and a Process button with a Click event . The validation happens in the Click event of the process button, through a method responsible for returning true if...
asked by 26.09.2018 / 19:10
2
answers

Remove item from a collection

Why is it incorrect to remove an object from a collection in this way? And why the release of the ConcurrentModificationException exception? for(String item: list) { list.remove(item); }     
asked by 06.11.2018 / 19:36
4
answers

Sum of each element of two lists

There is some code that adds the elements of two lists, for example: A=[1,2,3,4] B=[2,4,5,6] D=[3,6,8,10] # o elemento 3 e a soma dos elementos 1 e 2 da lista A e B     
asked by 23.06.2018 / 00:27
1
answer

lista.clear () vs list = new ArrayListT () [duplicate]

To remove all items from a list, I can do it in two ways: lista.clear() and lista = new ArrayList<T>() . What are the differences between them? In which situations should I use each?     
asked by 27.03.2017 / 21:43
1
answer

Save all types of variables in a vector / array?

How can I store values and variables of all types within a vector? Ex: vetor1.Add("valor em string"); vetor1.Add(100); vetor1.Add(100.10); vetor1.Add(-100); I have no idea how I can do this.     
asked by 04.02.2018 / 13:46
2
answers

Higher frequency of a string

I have a text where I am handling various things. Now I need to get the 3 words that repeat the most in the entire text. How can I do this? What is the best solution? I thought about storing in a list but I do not know how to put the word and...
asked by 09.09.2014 / 03:11
2
answers

How does Python maintain the same memory reference of a list after resizing it?

We know that objects of type list , because they are based on dynamic vectors, have a maximum internal capacity. We also know that when full capacity is reached and we want to insert a new value into the list, Python allocates a new array...
asked by 10.10.2017 / 17:10