import numpy as np
import pandas as pd
ID = [i for i in range(1,101)]
def tabela(imc):
if imc < 18.5:
return 'Abaixo do peso'
elif imc < 25 and imc >= 18.5:
return 'Saudável'
elif imc < 30 and imc >= 25:...
I need to make a program that reads n numbers (undetermined quantity) and then put them in order. The stop condition is the number 0.
I thought about throwing these values to a list and then sorting them.
I made a while loop, however,...
I'm trying to make a couple or odd game. The problem is that every time the sum of my play with that of the computer gives 'par' this error message appears. I've tried other types of formatting and the same error always appears. Also, this line...
I'm starting in Python and database and I've had three doubts!
For example, inside my database I have a "name" column.
Just to illustrate, let's say I want to get the contents of the "name" column corresponding to id = 1 and play on a Pytho...
The problem is that I can not separate arquivo_novo from /root/arquivo_novo , as indicated below. I just need the "new_file" to be able to get into the LOOP IF and the system returns /root/arquivo_novo and never enters the...
I have a code that accesses a CSV file through a function. I created a second function to change the name of the column header (changeName) and to not have to call it several times changing the parameters of "columnIngles" and "columnPortugues"...
Good evening, the down code in python3 should return a monthly amount according to the client's age, I used the time module to get the client's age when he informed his year of birth, thinking about the possibility of the user informing a year o...
I have a problem that may be very trivial but I can not understand. I found in a text by regular expression a number sequence of type XXXX / YYYY, after that I need to rename the .txt file with the sequence found. The problem is that when trying...
I have the following code
import pyautogui
pyautogui.moveTo(612, 269)
pyautogui.doubleClick()
copiar = pyautogui.hotkey('ctrl', 'c')
colar = pyautogui.hotkey('ctrl', 'v')
resultado = colar
print(resultado)
but my print is returning "None"....
How do I separate the parametrize, the expected input
@pytest.mark.parametrize('entrada, esperado',
[(1,0,0,), (1,0,)
])
def testa_raizes(entrada, esperado):
assert b.calcula_raizes(entrada...