Questions tagged as 'python'

1
answer

Can someone tell me where I have the error?

def asignacion_paquetes(U,m,v): P={} for u in range(U+1): P[0,u] =0 for i in range(1,len(m)+1): P[i,0]=0 for u in range(1,U+1): P[i,u] = max(P[i-1, u-x]+v[i,x] for x in range(0,min(u,m[i])+1))...
asked by 06.11.2017 / 16:35
0
answers

Improve a program to rate sentences [closed]

I have a comma-spaced csv file similar to this: ID,texto1,texto2,texto3 1,El niño juega, El hermano come mucho, El padre bebe y juega 2,El tío es feliz, Los hemanos Karamazov cantan y Gogol bebe, No me interesa 3, Sí, No, No lo sé I am tryi...
asked by 06.11.2017 / 17:43
2
answers

Incorrect operation of a character counter within strings in Python

Suppose I have the following sentence: oracion = 'Mi perro bonito come todas las noches' And I want to create a function that tells the occurrence of each character within it. To that end, we import string and create an alphabet that is our...
asked by 12.10.2017 / 07:21
1
answer

When filling in a python dictionary in for me, repeat the last value in the other items

I have a dictionary that I want to fill with two lists, one that has the key and another that has the values, when it is with the for to save each item it is removed in order and saves them, but at the time of printing the dictionary I see that...
asked by 11.10.2017 / 18:58
1
answer

Wait for answers to continue Selenium Python

I want to make this code with functions. With the data of the Login and achieve it and it is perfect, the problem comes later with 2 issues: The first, where it says #Clonar there is a change of URL and it is executed automatically once I...
asked by 12.10.2017 / 17:42
0
answers

Create a language system in python

I will create an open-source application for management with Kivy and I want to have a menu to choose between the languages: Spanish, Galician and English and that the user can choose the one they want. And then another file where the configu...
asked by 13.10.2017 / 21:23
1
answer

Access to data within a loop in the context - Django

I hope everything is fine. I have a problem and I come to the community waiting for your help! Grateful in advance. I try to do some consultations in Django, my query what you need to do is to know some figures of some users. It happens th...
asked by 17.10.2017 / 14:20
1
answer

Read csv in pandas does not show me all values

I'm working with a CSV file that comes down from a URL. I keep it and even there everything is perfect. Once I want to read it and print the results it just shows me some. He puts me some ... ... ... and tells me how many lines I have but he doe...
asked by 02.10.2017 / 19:32
1
answer

Make a pushButton close a Qdialog

Clicking on QPushButton gives the following error: Traceback (most recent call last): File "listageneral.py", line 59, in adios self.close() AttributeError: 'Ui_Dialog' object has no attribute 'close' This is the code: impo...
asked by 05.10.2017 / 19:48
2
answers

Generate random dates

I am making a program that randomly generates dates and prints them, if the date falls on a holiday, print a message such as: Happy Halloween! Now, if the chosen month is February and the day is one that February does not have, such as 29, 30 or...
asked by 31.10.2017 / 00:39