Posts by Lucas Maraal • 125 points
12 posts
-
4
votes3
answers98
viewsA: How to identify numeric digits in numbers within a list?
You can use list comprehension to solve your problem: lista = list(range(100)) lista = [x for x in lista if x % 10 != 7] In the second line of code we are saying that we want all the elements of the…
-
0
votes1
answer33
viewsA: Problems using Graphapi in Python - "there is no Graphapi attribute in the Facebook Module"?
The problem is that your script has the name of `facebook.py' and it happens by the way the module import works in Python. When we write import foo or from foo import bar, Python will search for the…
-
0
votes3
answers67
viewsA: How to not execute lines of code when the name is not in the list
I believe that your material has not yet presented functions, so for you to solve this exercise following the textbook, you must work with the concept of nesting. It’s not the best approach, but in…
-
0
votes1
answer116
viewsA: Repetition of values within a Dataframe
You can first replace the value 999.90 for np.nan and then use pandas.Dataframe.fillna. In [1]: import numpy as np In [2]: import pandas as pd In [3]: df = pd.DataFrame([[10,2,4,5], [20,7,8,9], [30,…
pythonanswered Lucas Maraal 125 -
-1
votes2
answers197
viewsA: What is the range defined by range in Python?
In Python the count starts from scratch, then: list(range(5)) [0,1,2,3,4]
python-3.xanswered Lucas Maraal 125 -
0
votes1
answer295
viewsQ: Scraping using Selenium and Beautifulsoup
I’m trying to make a Crap on a book blog, I need to get the titles and categories of all the books posted. In the first attempt, I got an Attribute Error, which should happen several times because…
-
1
votes1
answer50
viewsQ: Changing the style of a clone
I have a button that when clicked, it creates a square on the screen, which is a 100x100 div, like red background. For each click to appear a new square, I used container.appendChild(clone) being…
-
1
votes1
answer98
viewsQ: python - strange loop
I’m almost done with my application. In the final moments of the code I’m locking into a loop that I can’t resolve. # O programa pede para o usúario inserir uma data no formato dd/mm/aa, # e efetua…
-
0
votes2
answers684
viewsQ: Javascript - Separate a string and then add the values
I’m starting in javascript and came across a question. I need the user to enter their date of birth, which I will store day, month and year in several different. What I need is to separate the…
javascriptasked Lucas Maraal 125 -
0
votes1
answer1966
viewsQ: Vue-router <router-view> does not error but does not render
I am learning Vue and came across a problem. I installed the vue-router via npm. When I call the <router-view>, no error is indicated but the site does not render on the page. If I type the…
vue.jsasked Lucas Maraal 125 -
1
votes0
answers50
viewsQ: Check if the autoplay has been allowed
I’m working on a website that at home, has a background video and a carousel of text on top. I would like to, instead of trying to cheat the browser and force the autoplay, to upload a background…
html5-videoasked Lucas Maraal 125 -
0
votes3
answers1667
viewsQ: Prevent redirect after submitting the form
I’m a beginner in programming and I have a little problem here. I have already done a good research here in stackoverflow, both in Portuguese and in English, but I could not adapt or put a solution…