Questions tagged as 'python-3.x'

1
answer

How do I make a 2nd degree equation graph using Python?

I made a code that calculates Bhaskara for me and was thinking of making this program show the graph of the equation too, but I do not know how to do that. if anyone knows how to do this, please give me a help. follow the code. Note: The graph i...
asked by 12.12.2017 / 02:48
1
answer

Function returning None when it finishes

The function, when it undoes recursion, returns None , and I'm not sure why. def fat(n): if n == 0 or n == 1: return 1 else: return n * fat(n - 1) def superfat (n, x = 1): if n > 0: x*=fat(n) n-=1 re...
asked by 11.12.2017 / 00:50
1
answer

Analyze numerical set looking for sequential numbers

I have a small part of the data below, sequence numbers: a = [(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15),(6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 19, 20, 23, 24, 25),(1, 2, 3, 4, 10, 11, 12, 13, 14, 16, 17, 20, 22, 24, 25),(3, 4, 7, 8, 9,...
asked by 09.12.2017 / 21:48
0
answers

Extract names and import to an excel sheet

I need to read TXT files and remove from them names of people and their respective "functions" of the text. These are minutes of hearing, where I must find the parties 'names (Complainant and Claimant) and the name of the parties' Attorneys. I...
asked by 20.12.2017 / 19:58
2
answers

How to read hyphen-separated numbers in a text file?

Let's say I have a text file where its configuration is: 1-2-3-4-5-6-7-8-9-10-11-12-13-14-15-16-17-18-19-20...-999 How do I read the file and save each number of the one that is separated by - ?     
asked by 23.11.2017 / 18:31
0
answers

How to generate Factory Boy Fuzzy Attribute before running each test?

I'm creating unit tests to perform integration tests for my web application. The tools I am using are: Mongomock to create a temporary instance of the database for testing and Factory Boy to create mock instances of my entities. In each t...
asked by 28.11.2017 / 14:43
0
answers

Identify items from a combobox and play in the loop for using Selenium JS and Python

I need to make a for loop to open an x number of tabs and each tab uses a different dashboard. The first part I already did how could make the second? Remembering preferentially with Xpath using JS and Python. Here is the code: # Abre qnt...
asked by 13.11.2017 / 19:31
2
answers

How to check if the txt file has a space in the last line

I have a script here that looks for all the .txt files in a folder and then joins them into one file. The problem is that some files have a "\ n" in the last line, causing the next line not to be below the previous one, causing errors when I...
asked by 09.11.2017 / 14:09
2
answers

Error in basic code in Kivy (Python)

I made a very simple code using Kivy, but of the error that is showing in the image below: The code is as follows: import kivy kivy.require('1.0.6') from kivy.app import App from kivy.uix.button import Button class MyApp(App): def bui...
asked by 04.11.2017 / 17:20
2
answers

How to read 4 numbers at a time, and should such numbers be separated by space only?

I made this code but the error on the 2nd line: In this case I did this function to solve a problem that my teacher passed, to know if a student was approved, disapproved, approved with praise or if he is going to do final proof. Please help...
asked by 05.11.2017 / 18:24