Good, we have a list that is ordered by a fitness already calculated called 'scored'. We are trying to 'poblacionNueva' keep the order of 'punctuated' but not show the fitness values of each element.
def selection_and_reproduction(poblacionNue...
I have two lists listA = [0, 4, 1, 3, 2] and listB = [0, 0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4] what I want is to get all those indexes where the element of listA appears in listB or that as a result would have listR...
I have a question
I'm doing an exercise of a calculator in Python 3.7.
I have the logic created and the calculator works correctly but I have the following doubt:
How do I ask the user if he wants to perform another operation and in the case of...
Good afternoon,
I hope you can help me.
I have a pdf that has the name "nombre_apellidop_apellidom_edad.pdf"
What I need is to extract the name of the pdf and divide it in order to use the data separately, an example would be this:
Jose...
Good friends, Greetings. The fact is that I am starting in the prog. And testing I found something curious. First look at the code and then the doubt. Thanks in advance
def body():
print(temps)
if __name__ == '__main__':
temps=list...
This code throws me the error:
matching query does not exist
Apparently the filter I have designed does not capture the id of the Orders.
Code:
models.py:
class Pedido(models.Model):
especialidad = models.ForeignKey('Especi...
#!usr/bin/env python
def vocales(string):
if "A" or "a" or "E" or "e" or "I" or "i" or "O" or "o" or "U" or "u" in string:
nvocalesami = (string.count("a"))
nvocalesama = (string.count("A"))
nvocalesemi = (string.count...
Pythonist friends, as a newbie and trying to learn about programming in python, I would like help on how to get only data string (name) in a function, and not allow me to continue if I do not type text. my code is:
class Nomina:
def __init...
Code:
from PyQt5 import QtGui
import sys
app = QtGui.QApplication(sys.argv)
window = QtGui.GWidget()
window.show()
Could you tell me why this error comes out, please.
AttributeError: module 'PyQt5.QtGui' has no attribute 'QApplication'...
Pager within this function and I do not know how to do it and tried several ways but it does not work out here I leave the pager code, please help me
class ListarTipoAlmacen(ListView):
model = Tipo_almacen
template_name = 'tipo_almacen/lista...