Or it could be that people are still working on the first few videos and haven't gotten to the later ones yet. Still a lot more likely they just gave up tho, which is pretty sad
I feel so lucky to find out your great channel. My programming knowledge was really low. I also have to point out that your comminication skills are extraordonary, you can easily teach whatever you want.. I will check out your all upcoming videos and please complete these series from beginning till the end. Do not break it at the mid part of all series like other youtube channels :( Thank you so much, from Turkey.
The fact that i solved the "swap" thing in this video..make me think that i understaded what you said in the video..it felt so good when i solved it..then u said an easier way..lol Great vid btw
I am new to Python and your first 4 videos have helped me grasp the simple concepts that used to plague me. Your teaching style is definitely something that I can follow along with! Keep the videos coming!
First off thank you CS Dojo for such a lovely series which has made python so understandable for us. To all the new devs/programmers, I find the best use of my time is watching one of these videos daily, looking for at least 2 other videos on the topic (for instance this one I’d follow it up with 2 other videos about lists) then come back to these videos for a refresh. It’s crazy how fast we can learn with this amazing help, thank you again!
I have been 'practicing' code for a year now, do not give up, it is a great skill to have and you can learn so much of you just put in that little bit of effort. If you do not understand something don't be afraid to ask or the favorite for all developers "Google It". Keep up practicing, you have to practice, practice, practice.
This is amazing i took the code to convert miles to km to make another converter, its a converter that tells you how old you will be when for eg. your mom is 50 The code is def convert(Mom): return Mom - the age (difference between your mom now) then you say print(convert(50)) My family were so amazed! Tysm!
this is one of the most useful videos i have ever seen on youtube , I just switched from med to engineering and had literally no knowledge about computer and i didnt think learning python would be this essy online . i have searched for a couple of tutorials but this was the most useful one yet .Thank you so much
You mentioned nested lists but not how to access them. Given the list a = [1, 2, 3, [10, 20, 30]] how would you get '20'? Think about whats returned when you call a[3]... answer is below. a[3][1] would return 20 :)
In my case after 7-8 minutes manually "debugging" it ;d print(b) ['microsoft', 'lala', 'apple', 'banana', [10, 20, 30]] Swapping 20 with 30 -> b[4][1], b[4][2] = b[4][2], b[4][1]
11swallowedinthesea I fixed the problem thanks to your help. Silly me! It turned out that instead of opening square bracket, i was typing opening curly bracket. BTW, I can't say thank you enough for the book. I highly appreciate that!
Hi YK..Thanks for these awesome videos. I tried the assignment using all the topics you covered in this video and it worked. b.append(b[0]) b[0] = b[2] b[2] = b[3] b.pop() print(b)
Funny that I could solve the exercise without his help first, and it succeeded, and it was exactly his answers. Well done for teaching me how to crack the codes
I noticed you didn't explain how to add integers or strings to lists _within_ a list. If anyone's curios, do the following: Input: a = [5, 10, 15, 20, [2, 4, 6, 8]] Input: a[4].append(10) Input: print(a) Output: [5, 10, 15, 20, [2, 4, 6, 8, 10]] Note that in the second line where is says "a[3]" the 3 is the index number of the list within a list. That means what's basically happening is the "a[3]" calls for that index item, which is the list that's within the original list, then appends the number "10" to it. Hope I helped :)
learning python 100% beginner lol, going into computer science, this series is really helping me understand, hoping to get an internship and raise my 'value' as a viable employee as i learn many more languages, thank you...you're setting me up for a good future , appreciate it very very much
Awesome programming things to learn from you..thank you so much for your thought to educate everyone about programming...all best..wish u a blessing happy new year..keep educating
This series is awesome, but I would love it if you would also start an intermediate or even advanced playlist/series of python tutorials, such as sorting or creating trees. Or, consider making a pygame tutorial to teach people how to program with images and graphics, as I'm sure many people would be interested in learning how that worked. Just some suggestions! Keep up the awesome work.
This video is awesome,i just want to add that if you want to recall a particular variable from a very long list,e.g a=[23,2,3,4,6,9,10,23,14,15,16,17,18,19,20],to avoid stress just know that the last variable on a very long list starts with -1 solution-> a[-1] gives you 20.
For single quotes when putting a string it would be 'Hello World' But let's say I wanted to type a person saying (NAME said, "Hello World") and put that into single quotes to print it. That would be 'NAME said, "Hello World"' but double quotes wont work in single quotes and single quotes won't work in double quotes.
I am 1st year in college and studying IT and I am starting to love it and finding out ur channel give me more advanve knoeledge but I wish we can also use windows language like javascript
Thanks a lot. Eagerly looking forward to the next episodes of this series. And one more request - you once had a poll on what topic you should make your next video, and one of the option was how you learned speaking English, so I'd just request if you ever make that video in future please also tell how can a non Japanese speakers can learn speaking Japanese at the age of 18.!!
I think the theme of the next video is depend on what is showed on the previous one and the lesson of Python is also necessary to be in order, that's why he didn't create poll. It's just my opinion, if it's wrong, ignore it.
Great stuff. You are a gifted teacher. Those are the ones that make a subject interesting and simplify things. I'm not Indian, BTW, as someone down this list suggested most here are. Just an old native born with an interest in coding. Thank you for this series, and keep up the good work.
you can do this too right? b = ("Banana", "Apple", "Microsoft") b[0] = ("Microsoft") b[2] = ("Banana") print(b) you can switch the 2 using this code right?
i have learned so much in a single day, you made things easier, though i am a chemical engineering student , i found programming very interesting watching your previous videos. plzz continue this series till the end. thank you :)
But he said to "swap" them, not reverse them. What if u had a list of 4 e.g: [ 1, 2, 3, 4 ] Now if u use the reverse command, the output will be [4, 3, 2, 1] The position of 2 and 3 is also swapped.
For those of you, who did not get the shortcut b[0], b[2] = b[2], b[0] means that he is conventionally assigning b[2] to b[0] and b[0] to b[2] at the same time in one line so that the values swap the places with a single command line.
7:12 Sir, i tried the same method even though it's my first time programming. But i used the same method as you. I was shocked when i saw you took a temporary variable 😊 May Allah bless you
You gave us a task to solve in the last video, a km to mile converter, so i wrote this: SPOILER ALLERT def km_to_mile_calculator(x): return 1.6*x # example 22 km to miles a = km_to_mile_calculator(22) print (a) 35.2 It works fine. Is it right or is there a better way to write that? Thanks in advance.
Good work! What if you wanted to concatenate 'It takes 35.2 kilometers.'? print( 'It takes ' + str( a ) + ' kilometers.' ) # why did I add str( a )? ruclips.net/video/qMZQw_SecYA/видео.html
not sure if you got you answer but you added the "str(a)" because Python cannot concatenate a string and integer. the value a is an INT. These are considered two separate types of objects.So, if you want to merge the two, you will need to convert the integer to a string, which is why you added the"str(a)". Hopefully that helps. reference: www.pythonforbeginners.com/concatenation/string-concatenation-and-formatting-in-python
The answer that was on the file that you can download on csdojo.io/python3 is as follows: def convert(miles): return 1.6 * miles and then he prints a few examples: print(convert(2)) print(convert(12))
YA, Actually i was doing a mistake. in the first line it should be [ ] this backet.not () this.Always remember to start a list with[ ].hope it would help you
I seriously appreciate the work which you are uploading, your videos are very efficient and effective as they are providing theoretical skills along with practical which is lacking in almost all the tutorial on RUclips. Great work, Keep it up!
hi! I am running the try jupyter notebook online version on my computer. Are there things I can't do now ? because the append and pop does not work. any tips?
Hello greetings from india, i lost hope doing programs but after seeing your video, now i can write my own code.. thank u for the inspiration and the way you teach is simply awesome..
Axel Voss You have b[0], b[2] on the left, basically as two variables. Then the equal sign assigns them both at the same time as b[2], b[0] respectively.
I'm just starting to view your series today and I'm currently at this video. I see a lot of people saying that your first video had more views and it's decreasing as the videos come because a lot of people are giving up. :D I'd like to be a few of those people who won't so that's whyI'll keep supporting you and thank you very much for this tutorial.
Indians have been lucky with 1-British colonization--Education--English language 2-That their culture loves education or are atleast obsessed with Education 3-Their population against the world. So do not be surprised if there are 500mil educated Indians vs just 30mil philipinos ...
Hello Echo and Pedro, Your comments are 8 months old so you both are probably way more experienced than me now in Python but I have to correct you for the sake of beginners like me who reads the comments. Your solution is actually bad which you should know by this date. Why? (for the begginers) - Because if you have more values after "banana", when you enter b.pop() it will pop out the last entered value which we don't want.
This was my solution to the practice problem. a = ['banana','apple','Microsoft'] a.append('banana') a.pop(0) 'banana' a.insert(0,'microsoft') a.pop(2) 'microsoft' >>> print(a) ['Microsoft', 'apple', 'banana'] >>> I'm starting to understand good algorithms vs basic. I need to start thinking about solutions that work for general problems not specific problems. Example, if the words changed in list a my solution would not work without my having to manually go and change the words. But CS dojo 's solution works no matter the objects.
Brilliant video series, I can not thank you enough and I think highly of your teaching abilities. If anyone was interested in the multiple ways you can reach the quick challenge answer, this was the code I used: b = ["banana", "apple", "microsoft"] b[0] = b[2] b.pop() b.append("banana") print(b) It's sort of cheating I think, but....
Thank you for allowing me to learn python ...you help me understand this language.....you really saved me because i am a welderjust trying to learn a better skill that uses more mind less body
Man i.love u . Ur the best . I've been looking for python tutorials for very long I cdnt find a correct one.coz all other RUclipsrs just strech the concept nd go slow. But ur explaination was amazing plz keep doin more of these tutorial.keep up the good work bro.
For the question i simply did this b = ["banana" , "apple" , "microsoft"] b[0] = "microsoft" b[2] = "banana" This worked fine. also dont forget print(b)
I didn't use a temp, I appended b[0], made b[0] = b=[2] then I did b.pop(2). You hadn't shown use how to pop an item not at the end yet, and I guessed the syntax wrong the first time I tried it (I did b.pop([2]) and had to google it, but I love that I'm starting to get these sort of ideas based on what you've taught us.
the stack was explained to me like books on top of each other. zero was position 1 2 3 so you have 4 items. today it all came together. swapping part made perfect sense.
# compute all multiples of 3 & 5 # less than 100 a = list(range(1, 101)) print(a) sum = 0 for b in a: sum += b print(sum) sum1 = 0 for c in range(1, 101): if c % 3 == 0: sum1 += c print(sum1) sum2 = 0 for d in range(1, 101): if d % 5 == 0: sum2 += d print(sum2) output 5050 1683 1050
You're a really great teacher. You explain each step very clearly. I haven't used the IDE that you use in your tutorials, but I've written some Python in in Text Editors, and within the Blender 3D Engine. Within those programs, you just keep typing without having to run or execute after creating new functions, or defining variables. So that part gets a little confusing for me, but still.... Great job. Best teacher on the Tube😀
hey YK i just discovered an another algorithm for swapping b[0] with b[2] :-- b.append("temporary") b[3] = b[0] b[0] = b[2] b[2] = b[3] b.pop() print(b) that's it and it also doesn't require extra space like you used temp variable in first method but it not very effective tough takes a lot of time to type second method is best and thanks for making all these amazing videos
I am so late to the party since I didn't find your channel until recently, but I love it man. Can't wait to get into all the content you've created since! I just moved to Seattle and it seems that competition is heavy for tech jobs here, so I'm trying to expand my knowledge in other programming. I know a bit of Java and C++ already, so it's great to add more to my resume.
You teach me more in 2 minutes than my professor does in 2 hours. Thank you.
Haha
well he did make 100k a year at google before
@@louisgreen3071 he’s a nice guy
I agree visual information is the best way of learning something
it's sad to see that the first vid has millions of views and then as every new video comes, more people start to give up
Consistency is the key to success and apparently not many people have it :v :/
Or it could be that people are still working on the first few videos and haven't gotten to the later ones yet. Still a lot more likely they just gave up tho, which is pretty sad
Lmao
this actually always happens in youtube playlists. if you see a game "let's play" playlist, you'll see that the views go down with every newer video.
Dont know why tho, it has been fun for me so far...
I feel so lucky to find out your great channel. My programming knowledge was really low. I also have to point out that your comminication skills are extraordonary, you can easily teach whatever you want.. I will check out your all upcoming videos and please complete these series from beginning till the end. Do not break it at the mid part of all series like other youtube channels :( Thank you so much, from Turkey.
Yah, same here
Indeed
The fact that i solved the "swap" thing in this video..make me think that i understaded what you said in the video..it felt so good when i solved it..then u said an easier way..lol
Great vid btw
yaaaaa
understood*
@@selimmiled9682 1 year ago*
@@baselqhawiesh3660 you still doing python?
@@ziks4547 yessir , i tried it before i started at uni , but now at uni i finished my first year , now second year am learning it right now
Also pop can take a index, so it won't just delete the last element within a list. You can say pop(0) which will pop the first element in the list.
Good! The default value it pops is the last value, or someList[ -1 ], if the length of someList is 200.
thanks!
yes and the 'popped' item can be sored in a variable incase you might want to use it later. i.e b = a.pop() .
I am new to Python and your first 4 videos have helped me grasp the simple concepts that used to plague me. Your teaching style is definitely something that I can follow along with! Keep the videos coming!
You make python look so easy. And you explain it very well than other youtube channels. Thanks!
First off thank you CS Dojo for such a lovely series which has made python so understandable for us. To all the new devs/programmers, I find the best use of my time is watching one of these videos daily, looking for at least 2 other videos on the topic (for instance this one I’d follow it up with 2 other videos about lists) then come back to these videos for a refresh. It’s crazy how fast we can learn with this amazing help, thank you again!
Thanks for the video and please continue this series...this is really helping me understanding python and I think I can do well in my exams now
@KKN _YT lmao
I have been 'practicing' code for a year now, do not give up, it is a great skill to have and you can learn so much of you just put in that little bit of effort. If you do not understand something don't be afraid to ask or the favorite for all developers "Google It".
Keep up practicing, you have to practice, practice, practice.
This is amazing i took the code to convert miles to km to make another converter, its a converter that tells you how old you will be when for eg. your mom is 50
The code is
def convert(Mom):
return Mom - the age (difference between your mom now)
then you say
print(convert(50))
My family were so amazed!
Tysm!
this is one of the most useful videos i have ever seen on youtube , I just switched from med to engineering and had literally no knowledge about computer and i didnt think learning python would be this essy online . i have searched for a couple of tutorials but this was the most useful one yet .Thank you so much
You mentioned nested lists but not how to access them. Given the list a = [1, 2, 3, [10, 20, 30]] how would you get '20'? Think about whats returned when you call a[3]... answer is below.
a[3][1] would return 20 :)
Nice! Stay safe during the Coronavirus!
Man, i searched comments long for this answer lol. Nice name too
In my case after 7-8 minutes manually "debugging" it ;d
print(b)
['microsoft', 'lala', 'apple', 'banana', [10, 20, 30]]
Swapping 20 with 30 ->
b[4][1], b[4][2] = b[4][2], b[4][1]
a = [1, 2, 3, [10, 20, 30]]
b = a[3]
c = b[1]
print(c)
11swallowedinthesea I fixed the problem thanks to your help. Silly me! It turned out that instead of opening square bracket, i was typing opening curly bracket. BTW, I can't say thank you enough for the book. I highly appreciate that!
You're a natural born teacher.
To be a good teacher is an innate talent.
Hi YK..Thanks for these awesome videos.
I tried the assignment using all the topics you covered in this video and it worked.
b.append(b[0])
b[0] = b[2]
b[2] = b[3]
b.pop()
print(b)
Thanks for this series. I've been sending my students over here to get a more in depth understanding of python
I wish you have done this 6 months ago, when i needed to learn it for my course. Better late than never.
Funny that I could solve the exercise without his help first, and it succeeded, and it was exactly his answers.
Well done for teaching me how to crack the codes
I noticed you didn't explain how to add integers or strings to lists _within_ a list. If anyone's curios, do the following:
Input: a = [5, 10, 15, 20, [2, 4, 6, 8]]
Input: a[4].append(10)
Input: print(a)
Output: [5, 10, 15, 20, [2, 4, 6, 8, 10]]
Note that in the second line where is says "a[3]" the 3 is the index number of the list within a list. That means what's basically happening is the "a[3]" calls for that index item, which is the list that's within the original list, then appends the number "10" to it.
Hope I helped :)
learning python 100% beginner lol, going into computer science, this series is really helping me understand, hoping to get an internship and raise my 'value' as a viable employee as i learn many more languages, thank you...you're setting me up for a good future , appreciate it very very much
Thank you yk sugishita with love from India ❤
Awesome programming things to learn from you..thank you so much for your thought to educate everyone about programming...all best..wish u a blessing happy new year..keep educating
b = ["banana", "apple", "microsoft"]
tem = b[0]
b[0] = b[2]
b[2] = tem
print(b)
Hey YK, your "swapping two variables" video really helps!
This series is awesome, but I would love it if you would also start an intermediate or even advanced playlist/series of python tutorials, such as sorting or creating trees. Or, consider making a pygame tutorial to teach people how to program with images and graphics, as I'm sure many people would be interested in learning how that worked. Just some suggestions! Keep up the awesome work.
This video is awesome,i just want to add that if you want to recall a particular variable from a very long list,e.g
a=[23,2,3,4,6,9,10,23,14,15,16,17,18,19,20],to avoid stress just know that the last variable on a very long list starts with -1
solution-> a[-1] gives you 20.
My solution:
b = ["banana", "apple", "microsof"]
b[0], b[2] = b[2], b[0]
print(b)
i did the same thing
same, saw this solution on the comment on the first video
There's one more way to swap inside a list........
a = ["banana","apple","microsoft"]
We can use
a[0]="microsoft"
a[2]="banana"
print(a)
@@sumeshwar.bhadwal8704 I did that too, I think it's faster
Abir Ahmed same
This videos get me excited because I love coding and every time I’m watch one I always learn something new
Incredible video 10/10. It's so simple. you've made programming fun to learn. Thank you.
You are by far the best teacher on you tube. Thanks man.
Why double quotes for strings instead of single quotes? Personal preference or is there another reason?
It's just personal preference
it is optional to use single or double quotes. both works super fine
For single quotes when putting a string it would be 'Hello World' But let's say I wanted to type a person saying (NAME said, "Hello World") and put that into single quotes to print it. That would be 'NAME said, "Hello World"' but double quotes wont work in single quotes and single quotes won't work in double quotes.
@@bitcoin_hair Just use the \ function, and you're good to go.
@@Drakonus_ True
I am 1st year in college and studying IT and I am starting to love it and finding out ur channel give me more advanve knoeledge but I wish we can also use windows language like javascript
I would like to share the easiest way of swapping:
a[0],a[2] = a[2],a[0]
GOOD LUCK
He already shared it, but thanks, dude. Also, you don't have spaces between the list indexes, so technically your code is incorrect.
@@RandomUtuberr No need to give space between list indexes it's works perfectly. Try it.
Actually in the last scenario easiest way to "swap" these items in list would be a.reverse
@@famousmc4433 no if we reverse original ualue get change
I saw this channel yesterday now I know how to make a BMI calculator and I am learning so much more
Thanks a lot. Eagerly looking forward to the next episodes of this series. And one more request - you once had a poll on what topic you should make your next video, and one of the option was how you learned speaking English, so I'd just request if you ever make that video in future please also tell how can a non Japanese speakers can learn speaking Japanese at the age of 18.!!
I think the theme of the next video is depend on what is showed on the previous one and the lesson of Python is also necessary to be in order, that's why he didn't create poll. It's just my opinion, if it's wrong, ignore it.
your ten minutes video are clear more than 2 hours of lesson in my university
i did this:
b.append("banana")
b[0] = "microsoft"
b.pop(2)
print(b)
[ 'microsoft, 'apple', 'banana' ]
a[0] = "microsoft";
a[2] = "banana";
better way
this dude knows his stuff👏👏
Need More😋😍
Great stuff. You are a gifted teacher. Those are the ones that make a subject interesting and simplify things. I'm not Indian, BTW, as someone down this list suggested most here are. Just an old native born with an interest in coding. Thank you for this series, and keep up the good work.
you can do this too right?
b = ("Banana", "Apple", "Microsoft")
b[0] = ("Microsoft")
b[2] = ("Banana")
print(b)
you can switch the 2 using this code right?
yeah
yeah, i did that
Yes, but YK explained in the first video, about variables, to avoid doing this.
You can do this but if string is too long then it's wasting of Time.. what he is doing is smart programming
i have learned so much in a single day, you made things easier, though i am a chemical engineering student , i found programming very interesting watching your previous videos. plzz continue this series till the end. thank you :)
b[: : -1] will also reverse list
So does b.reverse()
Loooool thx guys
But he said to "swap" them, not reverse them. What if u had a list of 4 e.g: [ 1, 2, 3, 4 ] Now if u use the reverse command, the output will be [4, 3, 2, 1] The position of 2 and 3 is also swapped.
For those of you, who did not get the shortcut
b[0], b[2] = b[2], b[0] means that he is conventionally assigning b[2] to b[0] and b[0] to b[2] at the same time in one line so that the values swap the places with a single command line.
Make a video for data-structures and algorithms in python
7:12
Sir, i tried the same method even though it's my first time programming. But i used the same method as you. I was shocked when i saw you took a temporary variable 😊
May Allah bless you
why were you shocked?
It's a reference for his first lesson of variables, where he also teaches how to swap between 2 variable's contents.
Hey CSU jojo, when i run a.append, i keep getting an error that say 'set' object has no Attribute 'Append' what could be the reason?
Mr. TAA me too
anyone get a answer yet ?
Alex Yeat type in google, you will find in 2 min, its because () {}
This also happened to me my list is called list and I want to add the number 4 to the end I write list.append(4)
Bradley Glover () is problem, you have to use these [ ]
Thank you CS dojo for making these videos. It's amazing how I never gets bored watching your videos. So helpful
You gave us a task to solve in the last video, a km to mile converter, so i wrote this:
SPOILER ALLERT
def km_to_mile_calculator(x):
return 1.6*x
# example 22 km to miles
a = km_to_mile_calculator(22)
print (a)
35.2
It works fine. Is it right or is there a better way to write that? Thanks in advance.
Good work! What if you wanted to concatenate 'It takes 35.2 kilometers.'?
print( 'It takes ' + str( a ) + ' kilometers.' )
# why did I add str( a )?
ruclips.net/video/qMZQw_SecYA/видео.html
Thanks. The result would be visualized more clearly that way.
not sure if you got you answer but you added the "str(a)" because Python cannot concatenate a string and integer. the value a is an INT. These are considered two separate types of objects.So, if you want to merge the two, you will need to convert the integer to a string, which is why you added the"str(a)". Hopefully that helps.
reference: www.pythonforbeginners.com/concatenation/string-concatenation-and-formatting-in-python
darin khath Nice!
The answer that was on the file that you can download on csdojo.io/python3 is as follows:
def convert(miles):
return 1.6 * miles
and then he prints a few examples:
print(convert(2))
print(convert(12))
Your videos are more helpful and informative than any of the reading assigned by my instructor.
Hey c.s. dojo.
In this program when I run a.append
(1) it gives an error.. what should I do
I also have this issue. Did you find out why it was doing it?
YA, Actually i was doing a mistake.
in the first line it should be [ ] this backet.not () this.Always remember to start a list with[ ].hope it would help you
@@mrlokeshkumar76 Slightly after I asked this question I figured it out as well lol. Many thanks for the respond though.
I seriously appreciate the work which you are uploading, your videos are very efficient and effective as they are providing theoretical skills along with practical which is lacking in almost all the tutorial on RUclips.
Great work, Keep it up!
Why don’t we do it this way :
b =[“banana”,”apple”,”microsoft”]
b[0] =“misrosoft”
b[2] =“banana”
Print(b)
[‘microsoft’, ‘apple’, ‘banana’]
that's what i thought too
i did that too lol
Because sometimes you dont know what is in the list. You only know that you want to swap first and third element
Wow, i can learn more from cs dojo than in my AP Computer Science class
hi! I am running the try jupyter notebook online version on my computer. Are there things I can't do now ?
because the append and pop does not work. any tips?
Same here
Same also here. Any suggestion fix for this?
Same here
Hello greetings from india, i lost hope doing programs but after seeing your video, now i can write my own code.. thank u for the inspiration and the way you teach is simply awesome..
i did it like this is this ok??
b[0], b[2] = b[2], b[0]
btw i didnt understand the Video can someone explain it easier
Axel Voss You have b[0], b[2] on the left, basically as two variables. Then the equal sign assigns them both at the same time as b[2], b[0] respectively.
Brandon Dilbeck thanks!!
I am so happy i found your channel. without it, i would have never learned anything about python! thank you so much!
My code for the problem was:
b[0] ="microsoft"
b[2] = "banana"
Was this bad code?
Nice!
shortest,easiest and laziest way of solving a problem
you can use b.reverse()
I'm just starting to view your series today and I'm currently at this video. I see a lot of people saying that your first video had more views and it's decreasing as the videos come because a lot of people are giving up. :D I'd like to be a few of those people who won't so that's whyI'll keep supporting you and thank you very much for this tutorial.
most of people are indians here like me
same thing observed by me
Chinese here
I'm brazilian living in Portugal who looks like Indian so, i guess i won :) LOL
Indians have been lucky with 1-British colonization--Education--English language
2-That their culture loves education or are atleast obsessed with Education
3-Their population against the world.
So do not be surprised if there are 500mil educated Indians vs just 30mil philipinos ...
i am form Tanzania
Your videos are truly easy to understand, none can deny
b[0] = b[2]
b.pop()
b.append("banana")
I think this is the solution to the problem.
I feel so dumb now, cause I thought i had made it simple, and than u came along. That's a much easier way congrats.
Pedro Fernandes You dont need to feel dumb. We are all just learning. Thnaks btw. Have a great day/night.
Hello Echo and Pedro,
Your comments are 8 months old so you both are probably way more experienced than me now in Python but I have to correct you for the sake of beginners like me who reads the comments.
Your solution is actually bad which you should know by this date.
Why? (for the begginers) - Because if you have more values after "banana", when you enter b.pop() it will pop out the last entered value which we don't want.
This was my solution to the practice problem.
a = ['banana','apple','Microsoft']
a.append('banana')
a.pop(0)
'banana'
a.insert(0,'microsoft')
a.pop(2)
'microsoft'
>>> print(a)
['Microsoft', 'apple', 'banana']
>>>
I'm starting to understand good algorithms vs basic. I need to start thinking about solutions that work for general problems not specific problems. Example, if the words changed in list a my solution would not work without my having to manually go and change the words. But CS dojo 's solution works no matter the objects.
i request you to please dont stop making advanced python videos too.....very hardly after alot research i found you as a greatest teacher......
Brilliant video series, I can not thank you enough and I think highly of your teaching abilities.
If anyone was interested in the multiple ways you can reach the quick challenge answer, this was the code I used:
b = ["banana", "apple", "microsoft"]
b[0] = b[2]
b.pop()
b.append("banana")
print(b)
It's sort of cheating I think, but....
I’ve been watching your tutorials and I gotta say that I love the way you say jupyter notebook. I love these videos! Thank you so much.
Can I get python pdf format notes to get deep knowledge so we can go throuh your videos and then follow notes
These videos are honestly a life saver
Finally I found best python tutorial...thank you YK sir... thanks a ton... from India
THANK YOU!!!! My cousin recommended me to you. It was the best thing he could ever tell me. Thanks, man
Best teacher of youtube.
It's the first time I left comment for an RUclips video. You are reeeeally helpful! Thanks a lot! Keep going!
I'm loving this series. This has been really helpful in reinforcing the basics.
This man is single handedly teaching me Python
Your videos have been helping me so much during my intro to programming class at university. Thank you!
i am a kid 9 years old and i decided to learn coding i have found a perfect person that can make my dream true
Thank you for allowing me to learn python ...you help me understand this language.....you really saved me because i am a welderjust trying to learn a better skill that uses more mind less body
Is clear that you was a big dev!. You speach is very clear and easy to understand..... +10!
Man i.love u . Ur the best .
I've been looking for python tutorials for very long I cdnt find a correct one.coz all other RUclipsrs just strech the concept nd go slow. But ur explaination was amazing plz keep doin more of these tutorial.keep up the good work bro.
Dojo, thank you for all your useful videos. You are a great teacher!
For the question i simply did this
b = ["banana" , "apple" , "microsoft"]
b[0] = "microsoft"
b[2] = "banana"
This worked fine. also dont forget
print(b)
I didn't use a temp, I appended b[0], made b[0] = b=[2] then I did b.pop(2). You hadn't shown use how to pop an item not at the end yet, and I guessed the syntax wrong the first time I tried it (I did b.pop([2]) and had to google it, but I love that I'm starting to get these sort of ideas based on what you've taught us.
You are great man !!!! Every morning before going to work I get piece by piece of your stuff Thank You !!!
Bro, I really love the way you explain. This is the first video I´ve watch, you got another subscription. Thanks to share your knowledge.
I'm very impressed with your language's skills! Thank You for Sharing Your Knowledge.
Thanks YK! Another good day and another step in Python learning. Onwards and upwards.
the stack was explained to me like books on top of each other. zero was position 1 2 3 so you have 4 items. today it all came together. swapping part made perfect sense.
# compute all multiples of 3 & 5
# less than 100
a = list(range(1, 101))
print(a)
sum = 0
for b in a:
sum += b
print(sum)
sum1 = 0
for c in range(1, 101):
if c % 3 == 0:
sum1 += c
print(sum1)
sum2 = 0
for d in range(1, 101):
if d % 5 == 0:
sum2 += d
print(sum2)
output
5050
1683
1050
Thanx for making this python tutorial, very helpful, easy to understand and help me to learn english by the same way
I am from india....i like the way you guide people like me....thanx
THX so much
This is the first tutorial that i dont get bored of
Cs jojo is hundred times better than my University teachers.
def func(miles):
return miles*1.609
x = func(60)
print(x)
It reads out "96.53999999999999"
Clear, simple short and efficient! Compliments
You're a really great teacher. You explain each step very clearly. I haven't used the IDE that you use in your tutorials, but I've written some Python in in Text Editors, and within the Blender 3D Engine. Within those programs, you just keep typing without having to run or execute after creating new functions, or defining variables. So that part gets a little confusing for me, but still.... Great job. Best teacher on the Tube😀
you use it for animation or for engineering?
@@iluvuvibez6644 I use Blender mainly for 3D modeling, and game development. I've done basic animation in it, but nothing like short film or anything.
hey YK
i just discovered an another algorithm for swapping b[0] with b[2] :--
b.append("temporary")
b[3] = b[0]
b[0] = b[2]
b[2] = b[3]
b.pop()
print(b)
that's it
and it also doesn't require extra space like you used temp variable in first method
but it not very effective tough
takes a lot of time to type
second method is best
and thanks for making all these amazing videos
You are making awesome & quality python content which is being a great help for me. Thank you @csdojo
I am so late to the party since I didn't find your channel until recently, but I love it man. Can't wait to get into all the content you've created since! I just moved to Seattle and it seems that competition is heavy for tech jobs here, so I'm trying to expand my knowledge in other programming. I know a bit of Java and C++ already, so it's great to add more to my resume.
The best lecture ever.
I really love your style of teaching stuff. Even my ADHD peanut brain could comprehend everything from start until finish
Yea agree with many folks here, your communication skills are very good.. 👍