Questions tagged as 'python'

3
answers

List files from a folder in Python

I'd like to know how to use the library os to list files from a given directory .     
asked by 09.05.2015 / 17:13
3
answers

Working with OCR to recognize photos

I am currently working on my Course Completion Work and the subject involves OCR. I did some research and found the Tesseract , I also found libraries in Nuget for it (I'm using C #). The problem is that my work is about reading Car Plate, when...
asked by 28.08.2014 / 13:54
3
answers

Identify if there is a capital letter in the string

I have declared two certain variables, one of which has a capital letter and the other only lowercase. See the example below: actor = "Jon Snow" pet = "wolf" How can I identify if there is at least one uppercase letter in string ?     
asked by 29.03.2017 / 16:36
4
answers

How can I tell if the variable is an integer in Python?

How can I tell if the variable is an integer in Python? I know how to do this in PHP: is_int($variable); // bool(true) But how can I do it in Python? Example: numero = 1 #é numero nao_eh_numero = 'texto' # não é número     
asked by 10.01.2017 / 19:13
3
answers

Virtual Assistant in Python - Efficiency

I'm creating a virtual assistant in Python, and I want it to be more "human". I want her to interpret my request, and not just compare what I said with a string. So my question is: To cover all variations of a request, such as " Will it rain...
asked by 07.06.2017 / 15:20
2
answers

How to make a loop that compares string with a float in python?

I'm assigning the 1.5 value to the h variable, but it does not accept values of type float and does not end the code. h = (input("Informe sua altura: ")) # aqui ele recebe um elemento qualquer while h != float: # aqui fa...
asked by 13.07.2016 / 15:25
2
answers

python: compare list that contains multiple lists with a different unique list

I am solving a question where I have to do a program that corrects evidence. The program receives a feedback and "n" students responses and compares with the template provided. The answers of all students are put on a single list. My problem is,...
asked by 12.09.2016 / 15:31
1
answer

Combine all x, y, z coordinates of a list of tuples

I have the following list with several points: [(14, 9, 7), (11, 1, 20), (1, 1, 7), (13, 9, 1), (9, 13, 4), (20, 1, 4), (17, 6, 8), (14, 10, 1), (14, 2, 17), (7, 20, 7)] Each element of the list is a tuple with the coordinates (x, y, z), wh...
asked by 06.01.2017 / 15:14
3
answers

How do I return a value in the Brazilian currency format in the Django view?

How do I return the 1768 value in the currency format BRL 1.768,00 in the Django view? def moeda(request): valor = 1768 # formata o valor return HttpResponse('Valor: %s' % valor)     
asked by 27.05.2015 / 15:32
2
answers

How to print a txt file in Python

How to print a txt file in Python? I'm not referring to print but rather to print to the printer. Thank you (:     
asked by 20.05.2015 / 21:03