Category : function

I asked this question before but the answer was not provided as a function. I’ve tried to put in into a dunction but it didn’t work so I’m asking again:) So here is a sample CSV file that I have to analyze 1,8dac2b,ewmzr,jewelry,phone0,9759243157894736,us,69.166.231.58,vasstdc27m7nks3 2,668d39,aeqok,furniture,phone1,9759243157894736,jp,50.201.125.84,jmqlhflrzwuay9c 3,622r49,arqek,vehicle,phone2,9759544365415694736,az,53.001.135.54,weqlhrerreuert6f 4,6444t43,rrdwk,vehicle,phone9,9759543263245434353,au,54.241.234.64,weqqyqtqwrtert6f and I’m tryna use this function def popvote(list) to ..

Read more

So I have a csv file which contains several data like this 1,8dac2b,ewmzr,jewelry,phone0,9759243157894736,us,69.166.231.58,vasstdc27m7nks3 2,668d39,aeqok,furniture,phone1,9759243157894736,jp,50.201.125.84,jmqlhflrzwuay9c 3,622r49,arqek,vehicle,phone2,9759544365415694736,az,53.001.135.54,weqlhrerreuert6f 4,6444t43,rrdwk,vehicle,phone9,9759543263245434353,au,54.241.234.64,weqqyqtqwrtert6f and I’m tryna use this this function def popvote(list) to return the most popular thing in auction which in the example is vehicle so I want my function to return what’s the most popular thing in the 4th row.. ..

Read more

Code: Action = input("Please enter your option: ") if Action == "1": Why is the program saying: expected indented block, expected expression, statements must be separated by newlines or semicolons In the older versions of Python, this function worked properly. However, once I download Python 3.9 it seemed to not be acceptable. Can someone please ..

Read more

Here is my code def month_name(x): if (x==1): print ("January") if (x==2): print("Febuary") if (x==3): print("March") if (x==4): print("April") if (x==5): print("May") if (x==6): print("June") if (x==7): print("July") if (x==8): print("August") if(x==9): print("September") if(x==10): print("October") if(x==11): print("November") if(x==12): print("December") if(x<1 or x>12): print("Enter a valid month bozo") month = int(input("Enter the month you were born ..

Read more

I have a below list, [datetime.date(2011, 3, 12), datetime.date(2014, 3, 12), datetime.date(2021, 12, 12)] And want to write a program that would check if a given date say in a function when passed, is able to check whether the date is present inside this list or not. Here is a sample code I am trying: ..

Read more

I already defined the variable in another function yet it gives me an error of " " not defined in pylance. Here’s my main function that I am connecting with #New Window Upon Click def openSignUp(): newUp = Toplevel() newUp.title("Sign-up") newUp.geometry("800×500+265+120") signup = ImageTk.PhotoImage(Image.open("pupp.jpg")) hello = Label(newUp, image= signup) hello.image = signup hello.pack() On the ..

Read more

I’m begin to Python and i’m trying to make a levenshtein’s function, with a condition that finds a row of characters following, between two list of words. I search something like this: List1 = [‘Birmanie’, ‘BiĂ©lorussie’, ‘Bolivie’, ‘Brunei’, ‘Burkina’, ‘BĂ©lize’, ‘Cap-Vert’] List2 = [‘Belize’, ‘Bermudes’, ‘Bolivie (État plurinational de)’, ‘BrunĂ©i Darussalam’, ‘Burkina Faso’, ‘BĂ©larus’, ‘Cabo ..

Read more