Questions tagged as 'python-3.x'

1
answer

Finalizing a project in python [duplicate]

I have some doubts about the projects created in python. If I create a program and need to pass it to someone else, will I need the other computer to have python installed and all the libs I got from outside? How do I leave the program a...
asked by 01.12.2017 / 00:21
1
answer

Creation of variables

How do I create a variable and add the type as an integer but with no value set? I need this variable to do this: a = int(input()) b = int(input()) x = int # tentei colocar o tipo da variável como inteira dessa forma, mas dá erro. if a * x ==...
asked by 17.12.2017 / 15:47
1
answer

Information exchange between Python classes

How can I exchange information between two different classes? I need to move data from one to the other. Each class is running in a different process. An example of the structure, the code is too large, so there goes an example, the only diff...
asked by 15.12.2017 / 19:20
1
answer

Dictionary running all keys instead of just one

I have in the following code I have a function that performs certain operation according to the passed parameters. Then I have a dictionary serving as a switch case, which will serve to define which parameters will be passed to the function. d...
asked by 03.11.2017 / 16:53
1
answer

Iterator should return a String

Hello, I have the following code: import csv def carregar_acessos(): X = [] Y = [] arquivo = open('acesso_pagina.csv', 'rb') leitor = csv.reader(arquivo) next(leitor) for home,como_funciona,contato,comprou in leito...
asked by 13.11.2017 / 23:52
1
answer

Subtitles Figure

I would like to know why a picture appears in the image in the 2dB column in the 10 ^ 0 line and how can I delete it without deleting the markers on the blue line, what do I want? The code to do the plot is this: #==========================...
asked by 15.12.2017 / 12:23
2
answers

Submit form in python

I'm trying to submit a form on link , but I've already tried several ways here in stackoverflow of how to submit a form, and found no way to solve this problem. This is a code sample I took here in the forum and it did not work. import...
asked by 22.12.2017 / 14:30
1
answer

Cross valdation n-fold

W1 W2 W3 W4 A/N 0 0.543405 0.278369 0.424518 0.844776 1 1 0.121569 0.670749 0.825853 0.136707 1 2 0.891322 0.209202 0.185328 0.108377 1 3 0.978624 0.811683 0.171941 0.816225 0 4 0.431704...
asked by 31.10.2017 / 10:40
1
answer

"list indices must be integers or slices, not NoneType"

I'm trying to develop a game of old in python, which receives a user who will play against the computer, the output should tell the winner of the game or if it got old. Almost everything is correct, except when the game gets old, because I get t...
asked by 17.11.2017 / 00:55
2
answers

How to find the second lowest value of an array in python without using built-in functions?

I'm new to programming and I'm having trouble creating a code that returns the second value of an array , eg array = [2, 3, 6, 6, 5] return 3 I'm in that phase of practicing programming logic, because I already understand the whole ba...
asked by 19.10.2017 / 19:56