Questions tagged as 'python'

1
answer

I can not evolve [closed]

So, I can not evolve Python, I can not improve my programs, I do not know how to learn new things, new commands, by doc I can not because I do not understand how it works, if someone knows how to help me, I thank you, some more course in-depth,...
asked by 13.09.2017 / 04:21
1
answer

How to create a code in python and connect it to Mysql [closed]

Ee Galera, I'm learning the database language, but I still do not know everything so I came here to ask for help for you to know how I can do this. I know there is sqlite3 in python but I want to use mysql, which in the case I'm working with in...
asked by 21.05.2017 / 23:46
0
answers

How to apply backtracking for this type of problem?

My program solves a 4x5 sliding matrix puzzle with 10 pieces. (Print the solution, number of movements, time traveled, and parts path.) Code:importtimestart_time=time.time()importrandomclassPeca:def__init__(self,iniX,iniY,w,h):self.x=iniXsel...
asked by 29.12.2018 / 21:59
1
answer

I can not understand the cause of this error [closed]

I'm doing a project in python's game four online and I have the value function that tells me what value is placed at a certain point in the table. grelha = [[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0],...
asked by 13.12.2018 / 18:15
1
answer

selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: {"method": "id", "selector": "// input [contains (@id, [closed]

When using the code: self.browser.find_element_by_id("//input[contains(@id,'seq')]") I get the error message: selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: {"method":"id","selector":"//input[contain...
asked by 24.08.2018 / 20:48
2
answers

How to calculate numbers in a given range?

How could I compute the sum of the numbers in a range from 1 to 500 in which the summed numbers of this range must be odd and multiple of three ? > I've only been able to do the break so far: for c in range(3, 500, 3): if c % 2 != 0:...
asked by 23.10.2017 / 21:51
1
answer

Create functions in Python [closed]

I want to create a function that receives a vector of 10 registers, in which each has its name, state (SP or RJ) and age. And then a function to return how many people are of the same state. How could it be done? Thank you.     
asked by 03.06.2018 / 03:22
1
answer

Check which is greater using a formula in python [closed]

I need to use this formula and read three values and present the highest of the three values read. Formula: MaiorAB = (a+b+abs(a-b))/2 The three values are on the same receiving line. EX: MaiorAB = input().split(' ') Where and how can...
asked by 22.08.2017 / 15:48
1
answer

Convert dollars into real with Python

Create a program that asks for the amount of US $ and the rate and displays the amount of R $. dolar = float(input("Informe a quantidade de dólar para conversão: US$ ")) contaçao = float(input ("Informe o valor da cotação do dólar: R$ ")) conv...
asked by 19.09.2017 / 03:19
1
answer

Why list does not accept [01,02,03,04] [closed]

I'm starting in Python, I want to create a list of numbers, I wanted to use dezenas = [[01,02,03,04],[05,06,07,08],[09,10,11,12],[13,14,15,16],[17,18,19,20], [21,22,23,24],[25,26,27,28],[29,30,31,32],[33,34,35,36],[37,38,39,40],...
asked by 04.11.2018 / 01:00