Questions tagged as 'python-3.x'

1
answer

Script that receives a list of integers, sorts and removes duplicates

I'm doing python course and I'm trying to solve the following exercise: Exercise 1 - Removing repeated elements Write the remove_repetitions function that receives a list of integers as a parameter, checks to see if such a list has repeat...
asked by 29.06.2018 / 19:32
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
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

What is request.post and what is its function? [closed]

I'm studying python and I came across such a method, but even reading the documentation I still do not understand. Thank you very much in advance. The python documentation you were reading     
asked by 26.02.2018 / 18:01
1
answer

"Script" learning [closed]

Study system analysis and development and I'm after an internship, I did the interview and the employer asked me to study python, does anyone have any recommendations for "paths" to learn python? For example: Many say to learn OOP and then...
asked by 21.03.2018 / 13:40
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

bug in program

def trianguloPascal(n): lista = [[1],[1,1]] for i in range(1,n): linha = [1] for j in range(0,len(lista[i])-1): linha += [ lista[i][j] + lista[i][j+1] ] linha += [1] lista += [linha] return...
asked by 25.07.2018 / 21:49
2
answers

What range is set by range in Python?

When I define for i in range (5): My range goes through 0,1,2,3,4,5 or 1,2,3,4,5     
asked by 27.06.2018 / 15:22
2
answers

Creating a module

I'm having trouble creating my own module. I would like an example with a step by step of the steps to create a module so I can identify where I am going wrong.     
asked by 12.03.2018 / 02:30
1
answer

How to create a program that enters the web and takes the data of the stock exchange [closed]

Well my idea is to create a program that takes the data of the crypto-coins quotations so that I can keep track of them, but I do not know how to get this data live and make the program keep updating the data.     
asked by 22.12.2017 / 18:23