Questions tagged as 'python'

1
answer

'pip' is not recognized as an internal or external command, an operable program or a batch file

You know how to solve this problem I have python and pip installed when I type pip and I press enter it appears:    'pip' is not recognized as an internal command       or external, operable program or batch file. Do you know how to solve...
asked by 20.09.2017 / 01:46
1
answer

Storing variable values inside the while function

In one exercise I replied with this code: qntd_alunos = int(input("Digite a quantidade de alunos: ")) qnt = 0 while qnt <= qntd_alunos-1: MB1 = float(input("Digite a média do primeiro bimestre: ")) MB2 = float(input("Digite a média...
asked by 31.08.2017 / 17:50
1
answer

How to use joblib in Python for parallelism?

I was trying to use Thread of Python to parallelize my code but I ran into a problem: when I command to create the threads, the amount of them exceeds 1,000 Threads easily, which, from 140, all begin to give error. Searching a bit I found...
asked by 12.08.2017 / 19:37
1
answer

Python to C ++ conversion

I work on my course with C ++, and wanted to use a Python class variable access feature. Here's an example: class Telefone: nums = {} def __init__(self, numero): self.num = numero Telefone.nums[numero] = self p...
asked by 11.06.2017 / 20:30
1
answer

Errors in the program to sort a triangle

I have some problems and I do not know how to fix it: 1) An equilateral triangle, three equal sides and angles = 60 °, is read as an isosceles triangle (two equal sides). 2) In addition to misprinting, I can not remove this 'NONE'. 3) W...
asked by 10.06.2017 / 10:29
1
answer

I'm not understanding loops while nested

I'm having trouble understanding this code, because I do not understand how it behaves in 'while' loops, it follows instructions after the code. Obs1: I'm learning programming logic still, so       I'm "hitting head" with simple codes. Obs...
asked by 31.03.2017 / 17:49
3
answers

How to make a count of how many candidates are on this page? Python 3.6

Simple thing. I need to make a count of how many candidates in the table on this page, for example: link  For example there are 110 names, but I need to get this number and I have to do it in a huge number of pages with the same structure. Her...
asked by 02.03.2017 / 00:21
1
answer

Python doubt, such that a list is iterated in a repetition

Hello, the following algorithm relates the people and the friendly relationships between them. My question however refers to the for block indicated in the code. def not_the_same(user, other_user): return user["id"] != other_user["id"] de...
asked by 14.02.2017 / 23:50
1
answer

Python - MP3 Libraries

I'm doing a project based on the Python language and it requires good performance in Audio (MP3) playback. Currently I'm using PyGame with its pygame.mixer.music to be able to play the songs, however this lib is very weak and reclu...
asked by 12.05.2017 / 18:39
3
answers

Update Python on LE 4.0 (Ubuntu 10)

Hello I need to use SimpleHttpServer and only have it for Python 2.6.6 and above and LE 4.0 is Python 2.6.5. As it does not have software center (at least I did not find) I tried this code in the terminal but it gave several errors: sudo...
asked by 11.09.2016 / 13:13