Posts by Victor H. De Oliveira Côrtes • 71 points
7 posts
-
0
votes2
answers328
viewsA: Select column numpy no for
To select an element in a matrix in the format of numpy.array is written: matrix[n_linha, n_coluna] Whereas n_linha is a int representing the line number and n_coluna is also a int representing the…
-
2
votes2
answers79
viewsA: Using functional programming features to remove a word list from another list
The Error The line list(map(lambda x: words.remove(x),filtro)) is returning [None, None, None, None, None, None, None, None, None, None, None, None, None] (which is not the expected answer) because…
-
2
votes3
answers138
viewsA: The why of using break
The break serves to exit the loop it is in. For example, note the code below n = 0 while n < 5: print(n) n += 1 print('Fim do Loop!) If you run this code, it will appear on the screen 0 1 2 3 4…
-
0
votes1
answer87
viewsA: Handling characters not saved in variables with F'strings in Python 3
To use f-Strings, you have to decide if right after the f will want to use single quotes or double quotes. If you decide to use single quotes in f, then to write the string will have to use double…
-
1
votes2
answers3658
viewsA: How to modify the font size of the axis in Python matplotlib.pyplot
Importing the library as import matplotlib.pyplot as plt To change the font on the chart axes, type before your Plot plt.rcParams['xtick.labelsize'] = 20 plt.rcParams['ytick.labelsize'] = 20 to…
pythonanswered Victor H. De Oliveira Côrtes 71 -
1
votes2
answers77
viewsQ: How to "reimport" an object from a Python module?
I wrote a module called mymodule.py who has the function def funcion(x): return x So I imported this function into a code like from mymodule import function and worked normally. Then I wanted to…
-
1
votes0
answers55
viewsQ: How to round float in C without using printf()
I’m not getting round the float to the first two decimal places. I wrote my program like this: float valor; scanf("%f", &valor); printf("valor = %f\n", valor); Once compiled, I typed 573.93 to…