Posts by italojd32 • 148 points
10 posts
-
1
votes2
answers94
viewsA: How to make a replacement using the tuple list in python
The tuple has the premise of being immutable, what does that mean? You are able to see what is in each position of the tuple but you are not able to change it. Tuples resemble strings. Whenever you…
-
0
votes2
answers59
viewsA: I’m not getting through two lists, can anyone help me?
I broke my head a little bit and implemented this briot-rufini p = [6, -5, 1] #coef. do polinômio candidatos = [1, -2, 2, -3, +3, -6, +6, 1/3, 1/2] raiz = list() aux = 0 for i in candidatos: for j…
-
0
votes2
answers59
viewsA: I’m not getting through two lists, can anyone help me?
Who would be k and who would be a in your code ? I made a little code, I hope it helps, I didn’t use a Briot-Rufinni algorithm, I put 1/3 and 1/2, which are the roots of this polynomial to do a…
-
0
votes2
answers88
viewsA: Power calculation
1) You are working with global variables, this choice is not very indicated. Generally the use of global variables are to define, for example float pi = 3.1415;, this value will not be changed, in…
-
-2
votes1
answer312
viewsA: Stay in Loop until the entered value is negative
Boot with a large number the smallest, 0 will always be the smallest in the natural
python-3.xanswered italojd32 148 -
5
votes1
answer742
viewsQ: How does Python manage memory when assigning different types?
I wanted to understand how dynamic typing is done. In Python, for example, when we create a variable with content a number int and then that same variable gets a string, the fact of not giving…
-
1
votes2
answers164
viewsA: Upcasting and subsequent downcasting allows you to access the attribute of the original type?
I think there’s an example I’ve been able to better understand the overlap part of. There is a superclass geometric figures, within this superclass I have a method of area calculation. From this…
-
3
votes2
answers164
viewsQ: Upcasting and subsequent downcasting allows you to access the attribute of the original type?
When I make a upcasting, object 1 will be converted to its supertype and an object 2 is created When object 1 is instantiated before doing the upcasting, has attributes that do not exist in the…
-
1
votes4
answers1171
viewsA: Help in Portugol (se e senao encadeado)
Is there any structure in the port that can chain the conditions ? If the syntax is similar to other languages the if and otherwise only relate in the month of December. would be something like if…
-
2
votes1
answer106
viewsQ: Meaning of the parentheses in the instantiation in C#
I can’t understand the need for () to instantiate a class. Retangulo n1 = new Retangulo(); Is it the language’s own thing or has meaning behind?