Questions tagged as 'python-3.x'

1
answer

Select the two largest values of a vector and add them?

atletas = [] while True: nome = input("Nome: ") if not nome: break saltos = [] for i in range(3): salto = float(input("Distância {}: ".format(i+1))) saltos.append(salto) atletas.append({ "nome": no...
asked by 12.06.2018 / 23:24
1
answer

Use of the comma in Python [duplicate]

I'm having a problem understanding the difference between code 1 and code 2 (Fibonacci sequence). Apparently it looked the same, but the results they both print are distinct. Code 1 qtd_elementos = int(input()) inicio = 1 somador = 0 list...
asked by 13.06.2018 / 08:49
1
answer

Two doubts about tkinter

I have two doubts about the Tkinter GUI. The first is: how do I do when the text of a label is greater than the size of the label, rather than being missing, continue on the next line. The second would be how to make label texts that have "\ n"...
asked by 31.05.2018 / 21:51
1
answer

Specific section break in JSON file with python

Is it possible to perform a line break from a specific JSon thread, transform into an array, and then dynamize? Why I'm asking this .. I'm developing a file mining bot and I came across a situation where some pages return only one file on that l...
asked by 29.05.2018 / 14:01
1
answer

Heroku Login Error: Can not read property 'body' of undefined

Hello I'm getting the following error while trying to log in. heroku login heroku: Enter your login credentials Email: ########@gmailTypeError: Cannot read property 'body' of undefined at new HerokuAPIError (C:/ProgramFiles/heroku/clie...
asked by 09.06.2018 / 18:19
1
answer

Parking class in Python

I'm learning to program in Python. At this point I need to implement a class that has the following characteristics: A class called parking, which simulates the operation of a parking lot. - The class receives an integer and determines...
asked by 09.06.2018 / 17:35
1
answer

Write a string list in a file

I have a list and I wanted to write to another file ["AMANDA,"JULIANA","VANESSA","PATRICIA"] In a document using Python, I did however the file get all together type like this: AMANDAJULIANAVANESSAPATRICIA How could I fix this? def o...
asked by 24.05.2018 / 16:55
1
answer

Why does not Pycharm show the methods of a class?

I want to know why Pycharm does not show the methods of a class by pressing control + spaço. IDE's usually show all methods present in the class. In the image below I show you what IDE suggests to me of methods for any class.     
asked by 15.06.2018 / 15:26
1
answer

How to print the balance in ascending order and calculate interest in python

Personal I have a job in which I should reproduce the following table: IdonothavemuchknowledgeinpythonandI'mdoingmybesttotrytoreproduceit.ButI'monlyabletoreturnthisway. Mydoubtsareasfollows:ThemonthIdonotknowhowtoputinascendingorderorremovethe0...
asked by 20.06.2018 / 23:07
1
answer

Save Excel file in Python through Scrapy

How do I make my spider save in a single XML file all the Excel data from the links that I extract? Or do you also save in each single XLS file in the project folder? Part of my spider: def parse(self, response): divs = response.xpa...
asked by 14.05.2018 / 20:53