Posts by Victor Manhani • 167 points
8 posts
-
1
votes1
answer45
viewsA: Error while changing Javascript image
Well, there are some considerations to be made about your code: HTML <div id = 'msg'></div> <br /> <img id = 'photo' /> Here in javascript you declared the function, but…
-
1
votes3
answers33
viewsA: Calculate Two-digit Average reported by the user. However, the result is always zero
Well, the call of the function is coming without the parameters n1 and N2, but still it would result in error, because the point is that every time you click on the button it should bring the new…
javascriptanswered Victor Manhani 167 -
0
votes1
answer343
viewsA: Split dictionary in python
Well, come on: get the same result from the above function, not in a simple list, but in a list of Dict’s, using the element Keys as parameters. With the following output: [[{0: 123, 10: 456, 20:…
-
1
votes3
answers60
viewsA: Shorten Object Method Call
Well, I created some classes to explain some important concepts. The Athlete class is the base where you will have the attributes and the common methods in all other classes. class Atleta: def…
-
2
votes2
answers265
viewsA: Split sublist in python
According to entry and exit: def indexar(values): # Contador iniciado em 0 count = 0 # Lista com até 10 listas buckets = [[] for _ in range(10)] # O índice vai de 0 até o tamanho da lista buckets…
-
2
votes1
answer503
viewsA: Python and Kivy: How to select and copy all text from a Text Input
Well, welcome to the kivy world! 1) I would like to select all text within a Text Input in Kivy. Which attribute should I study for myself to change my code?; This is possible with the method…
-
0
votes1
answer62
viewsA: Python: because when declaring the constructor of the Daughter I also have to declare the constructor of the Mother?
In the first case you automatically load and overwrite the attributes of your class with the Widget inheritance. In the second case it doesn’t work because you carry __init__ of its class and…
-
3
votes1
answer42
viewsQ: How to handle an error within any Python class?
If I do something like: class Foo(object): pass print(Foo().python) **OUTPUT:** AttributeError: 'Foo' object has no attribute 'python' How can I treat this exception within my class, rather than…