Questions tagged as 'python'

2
answers

Factorial in python, [closed]

People, I'm new in the programming area, and doing exercises I came across the following question: Make a program that calculates the factorial of a user-supplied integer. Ex.: 5!=5.4.3.2.1=120 How do I use pycharm to solve...
asked by 22.10.2016 / 06:06
1
answer

How to start the full screen window with tkinter?

from caixaimport import * # Variables # Tkinter Variables win_width, win_height = 1280, 1024 windows = Tk() # start a variable Tk windows.geometry(f'{win_width}x{win_height}') windows.title('SCH payment system') # putting a title in variabl...
asked by 06.03.2018 / 01:40
1
answer

Read integer pairs using tuples in python

I'm new here, just like the Python language. This question that I present to you concerns a matter of faculty work. I tried every way I could solve it and I could not. I'm here for really despair. Here is my last attempt. Right after the questio...
asked by 06.03.2018 / 03:14
1
answer

Error creating column in dataset Pandas

Hello, I am creating a project in python using Pandas and I want to create a column whose values are the Closed - Open column, but an error occurs that I can not resolve. My code: import pandas as pd dataset = pd.read_csv(r'Documents\Pr...
asked by 21.03.2018 / 18:01
1
answer

How to proceed with batch execution for python methods

I have following code below: def exemplo01(): return 'exemplo01' def exemplo02(): return 'exemplo02' def exemplo03(): return 'exemplo03' def run(): #list of <class 'function'> fx = [] fx.append(exemplo01) f...
asked by 15.05.2018 / 15:28
1
answer

Search error error invalid [closed]

I'm trying to make an application to query a list of zip's that I own, but when the ex: zip = 40717000 does not exist an error is displayed and I can not follow to the next table record, can anyone help please? Thanks import requests import js...
asked by 16.05.2018 / 21:48
1
answer

Transform vectors into an array

I have several signals, where s1, s2 to sn, are vectors of size n, I would like to join them in an array to look like this: matriz = ( [s1] [s2] ... [sn] ) So that I can access an element at any point, for e...
asked by 11.05.2018 / 21:12
1
answer

Transform two lists of data into a graph with two parallel lines

Galera. I have been trying to do something that is very simple in Excel, but not in Python. I have two lists. Line1 = [1,1,1,0,1,0,1] and Line2 = [0,0,0,0,1,1,1] What I need to do is create a chart with these two lists and put them in para...
asked by 12.05.2018 / 17:04
1
answer

Django session, issue: Object of type '' is not JSON serializable

I am creating a student but when I try to save it inside a session, it returns the following error: Object of type 'Student' is not JSON serializable No settings.py: INSTALLED_APPS = [ 'django.contrib.admin', 'django....
asked by 21.08.2018 / 20:36
1
answer

Get a certain column from a multi-column file

Personal I have a text file with some information separated by ';' for each line example: Nome;Email;Telefone;Endereço;Civil I need to 'filter' only the 3 field (Address since it starts from 0) of each line, how can I do this? This is my...
asked by 16.08.2018 / 21:14