Posts by Laís Godinho • 79 points
4 posts
-
3
votes1
answer1661
viewsA: Python list of positive and negative numbers
With the method sort(). Example: lista = [] i = 0 while i < 6: lista.append(int(input())) i += 1 lista.sort() print(lista) To reverse the order just do: lista.sort(reverse = True) without the…
pythonanswered Laís Godinho 79 -
2
votes1
answer114
viewsA: Variable does not display correct result in C
The media, result and result 2 vectors should be of the float type. Another thing that can cause problems: taking into account that soma[l] += m1[l][c]; is the same thing as soma[l] = soma[l] +…
-
1
votes3
answers550
viewsA: Input jumps line, how not to jump in Python?
I don’t think it’s possible. But an alternative would be to do so: entrada = input() x, y = entrada.split() or entrada = input().split() x = entrada[0] y = entrada[1] remembering that split() can…
pythonanswered Laís Godinho 79 -
1
votes2
answers84
viewsA: Syntaxerror: invalid syntax, somebody help me!
You have to put two points when declaring function, like this: def derivadas(temps, A):
pythonanswered Laís Godinho 79