2017 How To Learn Programming in 100 Days - Day 4

2017 How To Learn Programming in 100 Days – Day 4

Views:4759|Rating:5.00|View Time:5:26Minutes|Likes:72|Dislikes:0
Here we are at Day 4 of Learning to program with Python!

100 Days of python programming to become a master! We are starting another playlist in programming where we will take a bar bone beginner starting from SCRATCH and getting them to python master in 100 days!

what is going on YouTube and welcome to day four of 100 days to becoming a Python master Python programming just you got to love it and and stay – and make sure you subscribe because we're going to be soon pushing out our minecraft and Python so even if someone is not into Minecraft you probably have kids or nieces your nephews you're going to learn how to use Python to create with a click of a button they can create some insanely cool stuff within Python of course I'll show you how to get it in and so forth well to utilize Java for that to get our Python coding in but it is fun as hell one of the best ways to learn coding is via video games so we're definitely going to capitalize on that now day 4 you can see we got a little bit of code here but we're learning a lot so here we have let's just get right into it I already have the debugger running on the hit to the console and let's go it's f8 through so first line of code line one we have variable values and what does values doing it's asking for an input and then we have just a string saying give me some CF number CS is not for computer science in this case it is for a comma separated number so I'm going to f8 that give me some CS numbers we will comply we will do 11 we'll do 12 will do 13 computers are very specific it did not say spaced at 45 89 76 56 and I'll hit enter now you can see those values that the user put in is now stored in memory in our code and I'm going to now we have a list equals values dot split and then I'm telling it to split it via a comma so now we have a list which is the variable that would created list equals the values and values is the variable that has the input and it just created a list that has all of the individual numbers we put in separated by a comma nothing very fancy yet we're going to go through the next line here line 3 which is tuple equals tuple lists list is the value that tuples going to be applied to so now we're taking our list and it's going to be converted into a tuple class and then we are going search you can see I mean it's it's subtle here we have the bracket here I have the parentheses so this immediately tells you to list this tells you it's a tuple and then we're just going to FA through that print the list so we printed our list here and then it printed the tuple now you're going to do a lot of work with lists but tuples are extraordinarily useful and again just as a reminder lists can be messed with you can add delete move on there's a lot of different methods that we can that we can put on lists they're what's called mutable meaning they can be mutated in a way and then you have to 'pls tuples are immutable they cannot be mutated when a tuple is set with its values so in this example this tuple list of eleven twelve thirteen forty five you're not you cannot mess with that tuple one it's in parentheses those numbers are fixed in the utilize and they stay stay stationed and the reason for that that becomes huge when we're doing different things with that is web based applications in the financial sector when utilize tuples it's when we have data transfer that we absolutely do not want messed with we even use tuples in pentesting which we'll get into down the road utilizing python for pen testing so nothing creates a tape with the code nothing nothing big but again remember you're not just doing this today on day four day four with this example of code these four lines do it use it and then go back and do day one day two day three as well each day doing this and again i don't care if you sit there watching TV while you're doing it just get and write the code yourself have a little on one side have the notebook that has the code or notepad and then on your right-hand side with pycharm or whatever developers you're using write the code get used to writing the code it's what it's more important than you think it might seem stupid just to write these things but it has huge implications and even start to get in the habit of saying certain things like as you're going through the list the variable has the assignment of values which is the variable love it dot split so the dot means were applying the split method to to the values and then we're telling it how we want it to be split just get in the habit of even speaking the language it really helps when you're trying to solidify the understanding of stuff before we get to the heavy hitters of machine learning and deep learning so that's it for today enjoy play with it break it fix it and then even try to use take the list that we've called lists conveniently so and do things to it doo doo doo list out of pens create that create a new empty list and do list out of pens and see what you can do with that in terms of appending the list on adding the index you can index through a list call the list but call the beginning of the list only to index position three and see what you get call the list and go to index position 19 and you'll see the error that you're indexing outside of what's available but play with it and have a great time and don't forget go back and do day one two and three and so forth you're not going to get 200 days of Master Python just by doing this little piece of code and then forgetting about it it has to be done every day and you're always going back and building building building and building so with that said get coding take it easy and I will see you guys next video

5 Replies to “2017 How To Learn Programming in 100 Days – Day 4”

  1. Botio Kuo

    AttributeError: 'tuple' object has no attribute 'split' …. I don't get it why it assumes the input as tuple object?

  2. machinerror

    Am I right with my guess, that is python code for version 3? I got an error and had to change it to raw_input to get a result.

Leave a Reply

Your email address will not be published. Required fields are marked *