Questions tagged as 'python'

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

list value to a variable, Python

I want to create a list, and assign a variable the value relative to the placement of that list For example list = ["a", "b", "c"] Let's assume that random gives me the letter "c" I want a variable n that receives the number 2     
asked by 22.12.2017 / 16: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
2
answers

How can I create sequence and math functions in python?

How can I make the interpreter understand what the previous value of a mathematical function is, for example: "Xn = 3.7 (xn-1)" where "n-1" means the result of the previous operation of the loop. Hard to understand but this is nothing less than...
asked by 23.12.2017 / 23:58
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
1
answer

Conditional after calculating Bhaskara

I'm trying to add a if to show the order of increasing numbers in the Bhaskara formula, though it shows an error message if the root is negative or there are no roots. How can I adjust? import math def delta(a,b,c): return b **...
asked by 16.11.2017 / 18:07
1
answer

How to hold a key press on the pyautogui

I would like to hold down a key for x seconds. I know that tapping the key is: pyautogui.press("key") But how can I keep it pressed?     
asked by 29.10.2017 / 01:55
1
answer

How to round up value created in pandas?

Hello Please, in Python 3 pandas I am creating this dataframe with the sum of another dataset: total = cand_doacoes.groupby(['CPF_candidato', 'Nome_candidato', 'Cargo']).Valor.sum().reset_index() total = total[(total['Cargo'] == 'Deputado Fed...
asked by 11.10.2017 / 20:19
1
answer

Help in Python! Guessing game!

I need some help with this little game. The question is this, the game I've already done and it's working perfectly, what I really need is loop with While . I can not find the error, as long as the user does not hit the value I need the ga...
asked by 10.11.2017 / 00:28