Questions tagged as 'python-3.x'

1
answer

How do you solve this exercise without using a loop?

We want to make a row of bricks that have long goal inches. We have a number of small bricks (1 inch each) and large bricks (5 inches each). Go back True if it is possible to make the goal by choosing between the given bricks. Function: def...
asked by 13.11.2018 / 02:47
2
answers

RESOLVED Client python server 3

Searching the web I found this code for communication between a client and a server Server #!/usr/bin/python import socket #utilidades de red y conexion ip = "192.168.0.18" puerto = 4445 dataConection = (ip, puerto) conexionesMaximas = 5 s...
asked by 06.11.2018 / 10:40
1
answer

deleter decorator in @property

In the next class, what object has the deleter decorator? class C: def __init__(self): self._x = None @property def x(self): """I'm the 'x' property.""" return self._x @x.setter def x(self, value):...
asked by 13.10.2016 / 09:22
1
answer

Scrapy can not find my spider

I have problems with Scrapy, for some reason when I run the project does not find my spider, but as much as I look at the code I can not find why. I had already used a similar code in another version of the code and found the spider. I leave...
asked by 29.10.2018 / 18:46
1
answer

dictionaries in dictionary, Python 3

I have a dictionary with lists: d1 = { 'Carlos': { 'manzanas': ['12', 'verdes', '7', 'rojas', '5'], 'uvas': ['8', 'negras', '5', 'verdes', '3'] }, 'Juan': { 'manzanas': ['7', 'verdes', '5', 'rojas', '2'], 'uvas':...
asked by 24.10.2018 / 01:00
1
answer

How do I clean my Canvas in python after showing an image and being able to show a new one?

Hi, I would like to know how I can clean my canvas after having shown an image, place a name function to erase to be able to clean the image that was shown and to be able to select a new one and it will be displayed on the canvas. If someone can...
asked by 08.11.2018 / 02:03
1
answer

how to show a whole and a float separately? 2.83 print (2) print (83)

numero = int(input("Ingresa un numero:")) h= str("minutos") #min= numero//60 print (min) print (h) dec = round((numero*60),2) Exercise 1.4 Write a code in which you request by screen that the user enter a number (the units are seconds). Onc...
asked by 20.10.2018 / 01:12
1
answer

Error creating the model class

I have been with this error for many days and I do not know what it is. Can someone help me? I already try several things and do the migration again but it does not let me     
asked by 25.07.2018 / 02:52
2
answers

autoincrement in python3

I am a beginner in python3, I have the following code that I am doing and paneas I go in the second option def menu(): print ('Selecciona una opcion') print ('1. Ver') print ('2. Agregar') print ('3. Eliminar') print ('4. Modificar') articulos...
asked by 14.04.2018 / 03:02
1
answer

Error with IF syntax invalid

I'm creating this function in Python: def myThreshold(I,p): Ibn = I; if((p > 0) && (p < 256)) index = find(I >= p); lbn = lbn * 0; lbn(index) = 255; return lbn but on the line of the if an error app...
asked by 26.09.2018 / 21:11