Questions tagged as 'python-3.x'

3
answers

Position of the largest prime number in a list

Good afternoon this is my code it took almost 2 hours looking at what I'm wrong and I could not find out please could you help me '' 'Read 10 integers, store them in a list and determine in which position of the list is the highest number rea...
asked by 23.09.2018 / 19:56
0
answers

Mark this bug with the pickle in Python 2.7

I have this problem running my script I stress that I am using the python 2.7, I would like to see if you can help me     
asked by 14.11.2018 / 08:51
1
answer

Save several DataFrames with a for loop in different sheets of the same excel file

I would appreciate your help, I have the following code: for embalse in ["PIL", "PUL", "VDV"]: vo = pd.read_csv('...\Desktop\pucv.xlsx',encoding='utf-8') vo=vo[vo["Embalse"]==embalse] writer = ExcelWriter('...\Desktop\embalses.xlsx...
asked by 11.09.2018 / 22:26
1
answer

_tkinter.TclError: bad listbox index "": must be active, anchor, end, @ x, y, or a number

Hello everyone I am currently trying to insert x amount of Listboxes in each Frame of a Notebook, depending on the number of elements in a dictionary and all this from a for loop, now I have created a function for me to print the name of the sel...
asked by 19.09.2018 / 17:43
0
answers

How to calculate the percentage in a Python calculator with the eval function?

I have written a calculator in python with PyQt5 and so far all the operations are performed correctly minus the percentage, for the evaluation of data I use eval, I appreciate your help. The code used is the following: import sys, math from...
asked by 04.09.2018 / 06:41
0
answers

Error when I try to assign a value to a key in a dict Python-Django

I'm doing a function and I'm taking out values from the request. I made a response variable which has 3 nodes to fill. This is the function from django.http import HttpResponse as hres import json def go( req ): res = { 'success':...
asked by 28.08.2018 / 22:54
1
answer

Generate csv file from matrix (nested lists)

I have a 1000x5 matrix, in the format ['1', 'Visa', '4539897685939002', '116', '5/2022\n'] All values within each row are strings and are sorted increasingly by the first index of each row, something like this: ['1', 'Visa', '453989768593...
asked by 16.08.2018 / 01:28
1
answer

Incorrect format in list output

I have the following query: sqlLote = ("select lot.idLote from Lote lot \ inner join [dbo].[Usuario] u on lot.idUsuario = u.idUsuario \ where u.userName = '%s'") % \ (usuario) The result of this query per sql gives    1 4 5 6...
asked by 15.08.2018 / 20:27
0
answers

How to align elements in win32ui, win32print

Good afternoon I have the following code to print an image in this case: import sys import win32print import win32ui from PIL import Image, ImageWin printer = win32print.EnumPrinters(2) for prin in printer: print(prin[2]) PHYSICALHEIGHT...
asked by 31.08.2018 / 20:59
0
answers

Formula to cancel debit tickets [closed]

I have the following data in sql. idImporte idmovimientotipo idcuentacorriente importe saldoInicial ----------- ------------------- -------------------- --------------------------------------- --...
asked by 31.08.2018 / 00:41