I'm trying to solve the following exercise:
To develop a program to verify the student's grade in a 10-question test, the program should ask the student the answer to each question.
question and at the end compare with the test te...
I have the following code:
self.option = QComboBox(self)
self.option.addItems(self.getJson)
def getJson(self):
self.data = {'image' : ['planet.jpg', 'cat.png', 'building.jpg']}
return self.data['image']
I want to make the return o...
I have a function that takes a parameter of type timedelta . I'm looking for ways to know if the object passed by parameter has any of its (days=0, seconds=0, microseconds=0, milliseconds=0, minutes=0, hours=0, weeks=0) negative att...
I've seen cases where the developer does the import of a module within a function, some cases mainly in the documentation of Django, why it was not very clear to me, if anyone can help me thank you.
I made this little program to try to simulate the methods 'split' and 'rsplit' of Python , but when I run it it does not print the last sentence of the string. For example, if in the string I type 'pao ou açucar ou café'...
I'm trying to remove empty rows from a csv document:
Document:
sentence, lingua
., pt
., in
., in
., it
., en
., pt
., pt
., en
., pt
., pt
"it's not expensive", in
...
I'm having the following problem, I have a class letter and I use the magic methods eq , ne , le , lt , gt to be able to compare the value of two cards and also to be able to use the sort function, and this works the way I expected but whe...
I have a csv file with more than 500,000 lines that I would like to separate into two dataframes.
The format of each line:
date, time, value of the variable of interest
dd-mm-aa, hh: mm: 00, float
The lines are recorded every minute. In...
This is my first code that does not involve my course classes. My goal is to put together a code that asks that any chemical symbol be inserted and this will tell your group. Very simple concept, but I'm having difficulties in it.
elemento = s...
How do I make my code check which url / link is in?
My code:
import requests as r
from bs4 import BeautifulSoup as bs
import time
import os
clear = lambda: os.system('cls')
clientes1 = 0
clientes2 = 0
ok = []
req = r.get('https://www...