How is it going? I am mostly interested in machine learning. What do you recommend after this series? Can I learn machine learning and or data analysis directly after this?
First of all, I really love that you're redoing your Python3 series....and you've a nice smooth teaching voice - which is always quite beneficial if your trying to learn something new! May i ask if you're going to introduce also VS Code and therefore it's Python3 environment? I doing computer only stuff when it's nice and bright light outside. So i do that stuff often at night times (way too often till the sunrise) *thumbs up*
3:45 this probably doesn't have an answer other than "because".. but wouldn't it make more sense for it to be "game[0[1]]" (^ doesn't work, i tried lol) it seems like it'd be a lot easier to keep track of super nested stuff that way
I'm trying to print multiple elements from a list on a line together. Specifically two at a time. Using a for loop I am able to print the elements all on separate lines. I can't seem to find a solution within the videos.
You are doing a "slice" here. Which is another way to output a list. Thats basically the syntax inside the brackys: [start:end:step] Start: at which index do you start printing end: and which index do you end printing (excluding) so a index of [5] stops after printing [4] step: how big is the step you are going through. In other words. You print everything starting at the first index ending at the last. But you have a step-range of 5. So it prints every 5th element starting at 0. Which in this case is the Element with Index [0] and [5]. thats why your output is [10,60]
For [1:3] the 1 indicates the place in the index. The 3 is the actual number inside the list. 1 is where ii begins, 3 is where it ends So using l=[1,2,3,4,5] [1:4] would show [2,3,4]
It's been a while since you commented, but maybe someone else stumbles upon this. It would not really be a mistake to use just a list of numbers instead of a list of lists of numbers. It would complicate your code though, because instead of doing game[2][2] to access the spot in the lower right you would have to do game[8] which is not really intuitive. Yes, it would be a tad more memory efficient to just use a single dimension, but readability of your code matters more. Readability prevents bugs, makes code easier to maintain and often (like in this example) easier to write. Edit: Also, printing the playing field would be more difficult
Write code that uses slicing to get rid of the the second 8 so that here are only two 8’s in the list bound to the variable nums. nums = ['4, 2, 8, 23.4, 8, 9, 545, 9, 1, 234.001, 5, 49, 8, 9 , 34, 52, 1, -2, 9.1, 4'] ??? Anyone can figure this one out?
#hey, why this works: def PurgeGameMap(): for x in range(len(game)): for y in range(len(game[x])): game[x][y] = E #and this doesnt? def PurgeGameMap(): for x in game: for y in game[x]: game[x][y] = E
Recorded at 3AM. Love it.
looks like the sun is out though
I watched it at 3AM lol
I'm watching it at 3 am!
It's daily routine now hope I can learn machine learning after it😅
How is it going? I am mostly interested in machine learning. What do you recommend after this series? Can I learn machine learning and or data analysis directly after this?
oh yes diahnt tell us wered you go which playlist/series to choose after this?
Your tutorials are interesting 👌🏼😬
First of all, I really love that you're redoing your Python3 series....and you've a nice smooth teaching voice - which is always quite beneficial if your trying to learn something new!
May i ask if you're going to introduce also VS Code and therefore it's Python3 environment?
I doing computer only stuff when it's nice and bright light outside. So i do that stuff often at night times (way too often till the sunrise) *thumbs up*
Not planning to spend more time on editors.
Disregarded one Pep 8 guideline by assigning a variable as l (i.e. lowercase L)... Threw me for a bit of a loop there thinking it was number 1
Thanks for the help!
Nice!
3:45 this probably doesn't have an answer other than "because".. but wouldn't it make more sense for it to be
"game[0[1]]"
(^ doesn't work, i tried lol)
it seems like it'd be a lot easier to keep track of super nested stuff that way
It's because game[0] calls the list at game[0], aka [0,0,0]. So game[0][1] is equivalent to [0,0,0][1].
Loving it
Have you done any tutorial series on Web authentication methods? How to scrap or navigate through websites that requires authentication?
I'm trying to print multiple elements from a list on a line together. Specifically two at a time. Using a for loop I am able to print the elements all on separate lines. I can't seem to find a solution within the videos.
Hey!
This is my input:
a = [10, 20, 30, 40, 50, 60, 70]
print(a[::5])
output:
[10, 60]
Can you tell me what is going on here?
You are doing a "slice" here. Which is another way to output a list.
Thats basically the syntax inside the brackys:
[start:end:step]
Start: at which index do you start printing
end: and which index do you end printing (excluding) so a index of [5] stops after printing [4]
step: how big is the step you are going through.
In other words. You print everything starting at the first index ending at the last. But you have a step-range of 5.
So it prints every 5th element starting at 0. Which in this case is the Element with Index [0] and [5].
thats why your output is [10,60]
@@Random4Logic That's really a helpful replay. I didn't know about the Step. Thank You!
because when we take range one value is reduced like in (1,6) the output comes out to be [1,2,3,4,5].
i think you should do a series on seaborn too. By the way thanks
I may at some point, but thats pretty far down my list of priorities.
print (l[1:3])- Hw does this print 2 and 3 since it indicate the indexes, it should actually print 2,3 and 4 right.. Can you pls clarify?
For [1:3] the 1 indicates the place in the index. The 3 is the actual number inside the list.
1 is where ii begins, 3 is where it ends
So using l=[1,2,3,4,5]
[1:4] would show [2,3,4]
You are like me do programming at night. I think programmers have no specific time for programming whenever we get time we code
what happened to the indistinct chatter + frequency sound (if I'm not mistaken) on the intro of your tutorials?
People complained :P been like 2+ years since I used it.
In print(l[1:3]) it prints from 1st index to 2nd index.But it should print till 3rd index right?Is the 3 not the index?Could you please explain
I am also having trouble wrapping my head around this!
At 3:10 "...that would be a mistake..." Why!? When we know why things shouldn't be used, we will also learn when they *should* be used.
Because of what I said leading up to that. I literally explained why it'd be a mistake the seconds prior. Go back and listen.
It's been a while since you commented, but maybe someone else stumbles upon this. It would not really be a mistake to use just a list of numbers instead of a list of lists of numbers. It would complicate your code though, because instead of doing game[2][2] to access the spot in the lower right you would have to do game[8] which is not really intuitive. Yes, it would be a tad more memory efficient to just use a single dimension, but readability of your code matters more. Readability prevents bugs, makes code easier to maintain and often (like in this example) easier to write.
Edit: Also, printing the playing field would be more difficult
How to type a square brackets in keyboard
Write code that uses slicing to get rid of the the second 8 so that here are only two 8’s in the list bound to the variable nums.
nums = ['4, 2, 8, 23.4, 8, 9, 545, 9, 1, 234.001, 5, 49, 8, 9 , 34, 52, 1, -2, 9.1, 4'] ???
Anyone can figure this one out?
sentdex I beg of you, PLEASE remove that comma after game[2] and the closing square brace lol
*remembers to make more of the trailing commas just for you*
@@sentdex *nooooooooo!!* Hahahaha
@@lank_asif Trailing comma is the way. At the very least it makes it a tiny bit easier to move lines around.
Hey! What type of laptop/pc would you recommend?
Whatever you can afford and like. Just about anything will do.
It's indices not indexes :)
Look the grammer nazis are here.
#hey, why this works:
def PurgeGameMap():
for x in range(len(game)):
for y in range(len(game[x])):
game[x][y] = E
#and this doesnt?
def PurgeGameMap():
for x in game:
for y in game[x]:
game[x][y] = E
This video was unexpected 😅
U have Discord?
sentdex sent me to watch this
Sentdex welcomes you to this.
hey bro copy paste the code in description pls
Lmao how do i access that party button?
3 am rip
4 dim. tik tac toe?