Prime Numbers, Times Tables, & More - Python Basics with Sam
Skills:
Python for Data80%
Key Takeaways
Explores Python basics, including prime numbers and times tables, using Python programming language
Full Transcript
you well hello everybody uh welcome back to another live stream here on free code camp and i am sam with python basics and all right so last time i commented on why you should i said don't over copy code and i said and i and i can't believe i did it and i slipped her and i said oh we can copy this it's the same these two are not the same so that's why it failed over and over and over again don't copy code so see what happens well i'm glad to be back everybody uh jan how are you doing with your issue with um your string and your character changes uh i hope that hope you're making some progress on that but i'm glad to be back today on this tuesday so today what we're going to be doing is we're going to be building upon everything we know so we are going to start with a times table and yeah that sounds oh it's just going to be columns and rows yeah but then we're going to learn to it's going poorly but uh all right i i can i can help some and then we'll toy around we're actually going to look at some f string today uh padding um air handling while loop uh we're gonna throw in some break and then uh we're gonna look at prime numbers we're gonna do what i think is some pretty cool stuff some really good basic thinking planning laying out so let's just go ahead and get into it so glad to have everybody here uh we got some people who've been around a while that is awesome because then we start to build um a relationship and a cadence and then we we can really start start solving some problems so all right uh everything looks good coming through so let's just get after it oh and if time allows may we build a little cool thing that we can do but like i was saying um this is our third this is our third stream and we've done some stuff and i just realized that i told you i was gonna do it and i haven't done it yet but i promise i'll get all this code and i actually saved the shell last time so i'm actually going to then upload that to my github so we can um you guys if you've missed anything can come back and watch and pull the code and see what it is all right let's go ahead and just get into it so first let's let's let's build us a times table let's comment all this out we don't need anything to print to the screen let's make sure we're good all right awesome hey and if i have not said this yet to this group but don't ever delete code just comment it out you're going to want to see something that you wrote and you're like what how'd i handle this and also i think it's very very very important to see your evolution and how that goes so all right times table so let's think about how we need to do this because we're going to run into some problems because i know you can get a times table up on the screen but how are we going to handle one repeatability if we want to do it again and two what happens if the user makes a mistake so let's just jump into it times table if i can spell if i haven't said that yet i'm not the world's best speller i'd actually comment that i'm probably the world's worst speller so all right let me click over see if we got any thank you quincy i appreciate that um nice to nice to see you here um that's that's awesome i like that all right so we got to think about it um what do we want to have happen so we're going to get we're going to get rows and columns out so let's handle that first for okay uh for row well first we need to handle input from the user i'm getting ahead of myself i'm sorry guys so input please let's get this out of your way please enter a number so what is the first problem we're going to have right here what is the very first problem we're going to have with this if i'm working with numbers what is my first problem with input anybody got any thoughts jan i think you've helped us with this before shoot i need to maybe my kids are right maybe i do need a third monitor all right so our first problem is going to be if we go and try to multiply this so if i go print x times 3 actually we ran into that last time divided by 2 times table let me click over i bet somebody's already answered bingo yep so if i enter a number i get all kinds of problem because the default and this is how we can know you can if you're super brand new which is the point of this help help help help help help python has some awesome awesome help um string it is prop gives you standard output string and it drops all the trailing so we need to wrap this we need to wrap this up int so now i can get this and i give it six okay cool so we're done there now we're going to take this and if i want a times table if i want a times table of we're just start small and then we'll build up to how to handle um multiple digits so all right for row we're going to just lay this out and we're going to have another problem for row in range x now so we got our rows and then we've done this before so then then what do we need to do we're then going to have a loop inside a loop because we're going to come down but we also then need to go column for column in range still x then now here's where it gets fun print row times column now we got all kinds of fun stuff problems here okay anybody remember how we start solving this anybody remember what we do here so we need a suppression i'm going to suppress the new line and we're going to start with an empty string let's go small swing kinda all right so now we got a little bit of a problem so we've compressed we've removed all new lines we've removed we've suppressed all new lines all right so then every time after the each new row we need to bring it we need to reactivate it okay we're getting close all right so now okay so i want one space in between all the letters excuse me all the numbers all right uh oh here's our first dilemma here is our very first dilemma this is ugly so now now we need to use our f string so now we're going to introduce f string so we saw last time we use string format we use brackets well f string is even more simple it is this brackets then whatever information you want inside the brackets now with this little tweak right here so i want to right now we're only gonna handle um up to three so we're gonna do our colon three because we could do two how do we do two first so what i did didn't close this out all right all right so enter four uh let's run this again in c5 because i made a boo-boo all right so what did i just do inside my f string i said i want here's my here's my information i want my columns and rows multiplied and i want you to have two i want you to give this every number two places all right that's what this means and if i go up to three this is going to then pad if i go let's do five so i'm going to have an extra space right here and now so now we're going to have an issue right now we are just we're just doing this one one time actually let's do our air handling first so now we are using this function and we know that we need to enter a digit all right so what happens if we enter a letter this is super important right here so whenever a computer crashes a program crashes a variety of things usually happen but more than likely what happens is a scenario happened and air handling did not grab that specific issue and it crashed and most of them are handled but you can get enough scenarios to happen and when you have more elaborate applications they go through and you can end up it's just like uh your streets in your town there's millions of ways to get to a certain location so python has a awesome awesome awesome tool try and accept so we're just going to look at it and we know how to do this let's get back over here and finally yes let's handle let's handle those errors i like that so we can if you're super super new here we're looking at in our interactive help prompt and we're typing in keywords so we're going to look at try and let's see if i can do my alphabet real fast e uh except so these two are linked together and um someone's already pointed out about finally but we're just gonna we're just gonna focus on try and basically the way that this works is try this and if this throws an error then do this and what is very awesome about python is you can actually become laser focused on what type of error you're looking for and then what to do because you're going to have times where you're going to have different errors but we're we're doing stepping stones we're doing we're doing micro topics just like everything else we do so um great so now so we're going to throw this in here and we're gonna move it over indent region okay so we're gonna go try so we're gonna try this and then we're gonna come out here same same indention accept and then what was our what was our accept it was a value error value error it's on the same line value and the e the va the v and the e are and look there's a perfect example of me not spelling i know i spelled it right that looks perfectly fine to me but it's not much it's not purple so that is an awesome check for me when i knew that it was not a term that python didn't recognize so i didn't spell it right all right then what do i want to have happen so i'm going to go we're just going to do print and we're just going to say oops please enter a number now let's look at this all right all right five okay now let's run it again oops m oops please enter a number oh but it's still exited so now we need to put this in a loop any thoughts on what kind of loop this might need to be so it needs to be what we're going to do is we're going to do a while loop so it's just going to run until we tell it to exterminate or tell it not to or set a condition for it to stop so let's look and see so you could do this a couple of ways well two so you could hardwire this and say true which is what we're gonna do or you could set it to a if if you're having a hard time with with um wanting to see it in your head you could set this to a you could set a variable at the top uh set it to true have that be here because we're actually then going to look at a keyword so we can just see this so now we need to move this over one more time one more time all right so this is going to right now this is going to do this until something happens okay all right all right see so there's but there's no way to exit so i'm just going to be sitting here getting times tables now let's handle one problem first anybody notice it yet 5 16 6 25 36. anybody anybody notice it's in there and the exception block do we need a nest try and accept inside the neck not in this scenario because i'll show you how we're going to lay this out and it's not going to bingo we have to add we need to add a plus 1 to our x but no this is going to be sufficient all right so here we go so let's solve one pro always always only change your code one one problem one thing at a time because if you go starting to change i mean both of them could be wrong or only one of them could be wrong so you could have either one two or four problems four scenarios to check so change one thing rerun your code check it all right so we need to solve this now so restart shell okay so in the way that we're going to do this is we need to learn about um how to break how to break out of this there we go and we're just going to pose this as a question let's get this up here yep cue input do you want to want another table so now the way that we're going to handle this let's do yeah and then i do y and no space all right so we're gonna like always we're gonna do this real careful and real slow let me click over here yeah my kids might be right all right oh okay i gotcha um yeah that show that might show you my my age all right so now we need to do a test uh then we need to learn how to handle perfect we're gonna do well actually i'll show you about about the continue i remember when i was first learning i thought we needed to continue but we actually are not it's just gonna only break out so what does break do that's for those of you that is exactly right so those of you who haven't seen break yet and break is very interesting nope uh yeah oh oop sorry break all right all right so let's look at this it will only break out one level so if you have multiple levels and i'm trying to i think i do have one somewhere and actually i think i just came to it but i'm not gonna i'm not gonna say it because i want to go double check but whenever you have a break it won't break out of the entire function or the all of the current loop the level the way that i like to say it is the level you're in so if you have multiple uh loops and you're indented that break will only get you out of the one that it is in you'll still get kicked over to the previous one or the one on the outside so it's um uh you're indented the body the body that you are currently in so if i put a break so if i put a break here it would kick out of this loop if i put a break here it would kick out of this loop we'd stay in this while loop so if i want to kick out of the while loop i would need to have a break here inside the body of said condition now we're going to look at this and guess what we're going to have someone who may not be paying attention or wants to cause problems absolute with a break statement yes yes move to the next one yes it will make it it will move out a level it will move out a level all right so uh we got y if q equals in break now because i want you to think about it the loop the while loop is already continuing so we actually don't need an else and i get your structure and i remember when i was first doing this and then i started to test and i wanted to see how how clean and how small and how small can short can i write this so now we got a problem here though all right because so basically i want you to look at that so what happens if what happens if the person it's all right we gotta have a problem here so we go yes so i get another but now check this out so then i wanna what happens if some reason they have their caps lock on i'm hitting in i'm hitting in or in oh no i'm i'm typing that wait a minute it just went so check this out this is the clean and simplest way to do this so now uh we talked about lower we talked about the string i got my caps lock on str lower everybody know what lower does the string method lower has everybody seen that before i fly right into this everybody good all right i still haven't figured out how long the delay is on chat okay all right converts everything everything to lower oh caption no caps that that's perfect all right shoot that's not what i meant to do meant to do this boom brings everything down so we can actually put this right here at the end this is completely legal so i'm going to take whatever input okay so what i'm saying is i'm going to take the input just like we wrapped our int around our input now excuse me i'm going to take my input and i'm going to lower it so i'm going to then control because what you always want to do is you always want to think about where can i mitigate a problem what is the user going to pay attention are they going to understand are they going to really get what what we need so we want to start boxing those problems in so now i have this well what happens if they write no they're they're not good they're going to get frustrated if they write no and it fails so check this out here's another way so basically if i write nope no no works so basically anything that starts with an n capital or lower click case in in lowercase n capital n all caps no nope anything so basically what happens if they're coming through and in their scenario they're used to whoa they're used to and they go okay yes i'd like another one still works we are mitigating this and shrinking this down that anything that even comes close that starts with an n then we'll break out so all right that is that and this will just go over and over and over again and we handled our uh we had handled our padding very nicely oops let's see oh did we handle did we go 12 did we solve our problem yeah um yeah why not let's check and make sure did we do 15 will that work so there we go and i just love times tables that you just have this on the edges where these look the same this was the first thing i noticed about patterns as a kid where you just come right through here and it's the same on either side i just thought that was just the coolest thing but if you haven't figured out yet i'm very nerdy sorry we have this all covered so now now let's move on to prime numbers let me comment this out because i don't need to see that anymore let's come down here and look at all of this oops sorry guys okay prime numbers who wants to tell me and explain to me what a prime number is anybody so why isn't one a prime number and why is 2 and even why is was 2 being an odd being an even number why is it prime so all right the definition of a prime number is a number that is divisible by one in itself so there in the definition has to be two numbers one and itself so a second has to be a second number so two being the only even prime number because you have two and then one prime and everything else is odd so that is very important to what we're going to be doing soon so we're going to be building upon this uh these things here with our prime and then i think we're going to that that flew we flew through that very very quickly so i think we'll even get to what the third idea that i had so i'm very actually very excited about this so all right we need to go and i want to show you what i has anybody ever written a a function of how to find if a number is prime or not anybody done that let's comment this out because what we're going to do next is after we because i have a feeling we'll be able to get through the prime very very quickly and then what is a awesome exercise is then can you find a specific a quantity of prime can you find i haven't had the need to so no okay well did we do that in session one oh i'm very embarrassed if we did that in session one i don't think so we did even an odd but we did not do prime we did an eve oh that's what you were saying an even check in lesson one yes yes yes yes yes we did the even odd check okay so basically this is just this is just souped up scenarios so we then have to go through we then have to think of every scenario and then there's even a way to do it because i remember the first the first one that i did that worked oh it was so painful it was so very very painful what i did is i made a i made a list to get to grab any number that was divisible and then i went and checked that list to see if there was anything in it so we're going to utilize our our break because that this is why i like to then tie these together now when i was getting started and showing i did not put these lessons together that they build wonderfully upon each other so we need to devise a function that is going to go through numbers check start start at a number go through and then if that number is divisible as a divisor of the number we are checking our potential prime then it will fail so i want you to think about this so we need to then have a way to check all numbers in a in a situation in a scenario in a certain window what would be the best thing how how how should we start what would be the best way to start what tools do we have so far to do this because this isn't awesome because where we're going to go is we're going to then have a function that's going to be able to check any number like if i if i said i want you to have a function that if i want to find the 1000th prime number how would we do that well guess what we're going to walk we're going to walk step by step through this so if we have a certain number and we know where we're going to stop and we know it's divisible we know we know it is at the end so basically we're going to go through we're going to use our range function and then we know what range does is i get a scenario so here we go so if i want to check and see if 10 is a prime number i don't need to do anything here because i don't need to test it because i know it's prime then i then i know that i don't need to if number greater than 1 for range in two through number divided by two if number modulo i that's pretty good let's see if we can let's see if we can even short shorten that up just a little bit but you are you're right in the ballpark that is that's pretty good that's that's that's very good so we really let's look at this so let's think about this so really because i don't need to check to check 10 i don't need to check one or zero so i literally only need to check two through 2 through whatever my number is and go from there so these are the scenarios and i need to then iterate through this check check this iterable and ch divide this into and as as has already been pointed out if it is evenly divisible so if it has a remainder of zero it's a it's not a prime because if any of these are a divisor have a remainder of 0 we're done we stop we stop checking so if we're checking 10 we know instantly that it is not a prime because 2 goes in evenly so we're done my first program when i did this i had to go check all of them then check a list then then spit it out so let's just look at this let's look at how clean and clear and small we can actually make this so for i in range 2 through x we just saw that so now if i excuse me if x modulo i zero so now we need to because we're going to use these as return we're going to use return here because we're actually going to use this program to then build and check how to find a specific prime so we're going to use return so i want you to look at this oopsie return false then come out here return true it is literally this this clean and clear all right because this is what's very cool we i don't think we've talked about this yet with return anything where a return hits it it exterminates so you do not remember i remember i was getting fancy and uh i i did something like this oops see how it won't even let you and that that's how you know i want you to see this so i'm here at i'm here at the end of my uh my return statement and i have i have a false and i want to get clever and i want to put a break here a python already knows that everything in this body going below and even really all of this code is dead code whenever a return is initiated ever everything terminates everything below it is dead code will not get to so you do not need to have a break when we use return so that's what we're going to do here but yes if we were using print yes we would need to have a break so we would we would exterminate and go out so that is 100 correct but i'm trying to see about uh in that range function of number number if number is greater than one and uh the the floor division of two i'm trying to wrap my head around that but here all right so that is our prime number and let's go through and just check let's check this so we have a nice handy dandy list right here then we're going to go for num in test then print f bracket num is a prime number and then we call the function i messed this up is prime just to be consistent so when we're going to be then we pass it num and then close this out and then close that out oops so it's changing variables in the middle of the lesson does all right 3 is a prime number true 6 is a prime number false 11 is a prime number true and 31 is a prime number true all right so does that all make sense of what i did right there so i took my i took my new function that i created i then took a test scenario an interval i'm iterating through this iterable and then i'm printing it out and calling that function inside my f string so jan this is kind of and i don't know if we'll get to um multi-line strings but um this is how you'd handle your scenario just to give you a little hint you'd have these brackets in here and you'd go back and have those assigned to variables with whatever scenario you would have does that make sense all right okay so now we need to see and figure out a way of how in the world we are going to then track track our that's not what i need to see sorry so the two is the first prime number three is the second and did i have this up and uh so we just need to go through and get started so all right so now we're going to look at we're going to look at the nth how to make an nth prime number function so def nth what i call this nth prime all right so basically the premise of this is is if i want the hundredth prime number how would we do that so we need a way to so we already know how to check if a if a number is a prime so we need to continue adding numbers so we need to we need to figure out how are we going to do this because if we well you are you guys are doing a really good job and you guys ask a lot of good questions ask a a lot a lot of good questions okay so look i will tell you i bet when i started i was probably further further lost than you guys are actually i'm i'm kind of intrigued if everybody wouldn't mind in the chat commenting how long they've been working with python i would love to know that that would be very cool so all right so we need to just we need to we need to decide how we're going to do this because i remember when i first started doing this i was like oh my god so i need to check the first thousand numbers that's inaccurate we're counting a sequence of oh very cool well i promise you in the first month of me trying and learning python um uh you guys are much further along than i was at med month one so i wanna i wanna tell you guys that and um let you guys know that is a lot of lines so that is that is uh that is very that's very impressive all right so we need to so we need to just we need to figure out how we're going to be do how we're going to be doing this well uh i started with c plus plus a hundred years ago and i love the idea of programming but i just could not get it then uh gosh it's coming up on eight years ago now i read some articles and python was in there and i was like wow i've never heard of this and i've been off to the races ever since so all right but our our nth prime number so when my brain first went i said okay so i need to check i need to figure out if it's in this span and that's inaccurate so i need to figure out a way to count prime numbers so if it passes this test so i need to reason why i like doing this right here is to show you we're going to be using this inside of this just like we did up here with our blank lines so it's gonna look a lot like this so as you can see i like to build i like to build one thing upon another so it doesn't become very foreign and we don't go from hello world to uh building a machine learn learning uh algorithm i like excuse me i like to take baby steps so it reinforces what you've learned and you have a toolbox full of tools that then you get you get handed any problem you know how to do it you want to break it down you want to break it down into something that is so simple you can explain to a five-year-old if you can explain it to a five-year-old you can put it in um python code and have the uh interpreter work with it all right oop there we go so we need to set some rules so one of the dirty things one of the dirt one of the dirty rules about programming is you have to have a starting point that's that's one of the dirty little secrets you just can't you just can't go you have to start someplace so i've alluded to how we're going to do this so we have a scenario and you have a certain set of rules so if i go and i want to start at 2 and just to make this to speed this up we're going to realize that excluding 2 every every other prime number is odd all right i'll say that again excluding 2 every other prime number is odd so we're going to count by two so we're going to speed up our loop by not checking every number we're only going to check the odd numbers so we're going to go by twos and move on so that being said we need to we need to set up our our our setup to then solve and plan how to handle this so we're going to take in our x number if if i want to find the 100th prime number you'd enter that there so and that's why that looked weird nth prime that was all right so we are going to start at three then our prime is two so why why am i doing this because again what is our starting point so we're gonna we're gonna kind of push start this um algorithm so we know the first one is two and then everything's subsequently thereafter starts here and will then increment by two every uh every odd number only i we're gonna we're gonna start just like we did here we're gonna remove any possibility well why in the world should we be checking all any any even number because we know it's not because it's divisible by two off the bat so then that's our starting point so if somebody enters one right here i want to know what the first prime number is okay i got you excuse me return two boom that handles that scenario so then now everything there after shoot let me see if anybody's got oh yes the yes the zen of python is actually very very very very cool uh do you remember how to import it while we're talking about this the zen import what and it just runs anybody remember this just this that's how set up to the top it is it is a python module runs right through here yes if you've not read the zen of python i highly recommend it it is it is extremely it's very simple very clean beautiful is better than ugly explicit is better than implicit simple is better than complex flat is better than nested there you go so just wanted to throw that out that is that is a very good call out so all right back back to back to our is prime so now we need to then figure out this so while prime so what what are we what are we testing what are we what are we wanting to see how are we going to go about this so while while what is less well what is less than this so we have we have found this is our second prime number oh i misspoke this is our second prime right here so we're going to have prime be our counter we could count so prime we could have had uh this is our nth prime number this is two and it is three so while prime is less than x we need to do something so if i were to input right now if i were to input um two three would come out because our second prime number is three does that make sense that's how we have this we could have set count and i forgot that i changed that because we are wanting to this is the second prime and we're going to do that going forward and if you wanted to rearrange this whatever prime number and then your count you could but the way that we're going to build this is we're going to say i want this to continue while this count is less than this all right so the first thing we need to do is it's it's less than this and this is the second one so i need to add to this so num i need to increment oops by two then if is prime number then prime plus all right let's go slow let's go slow let's come back up here so what am i doing right here because we set this up that we're gonna have this test oops i didn't drop out did i okay that's why we're setting this up because it's going to return create return create something and i think uh jan was that you who made that comment right before the stream about in place and um uh none so my function is returning creating false or true so i'm going to have my condition right here this is going to this is going to go if this is going to return either true or false so then if true so if this number num is prime it's going to come down here and it's going to then do something and we're going to increment prime by 1. then we're going to come out here and i know that i just made a mistake because my return didn't go orange all right so let's check this let me make sure do i have a table of prime numbers let's see 1 000 prime numbers there we go so all right let's check this and then we're going to run it so let's bring this back does this make sense to everybody because most of the time i do this lesson i want the 1 2 3 4 5 6 7 8 9 10 10th prime number okay that did work let's click over here okay all right cool yes uh yeah you were talking about in play yeah the the video in place or return are none in place of none all right so what what in the world did i just do so i took a i took a function i built another function around it and i'm passing in and creating a test of how in the world could we check and see if a number is prime so then i want to know the quantity of prime numbers i want to know what the 10th prime number is all right so now what happens if i wanted oh that's a good one all right i have another note here what happens if i wanted a list of how would this how would if i wanted a list of all the primes and this is going to be list comprehension all right who said who was saying last week that list comprehension is uh is a challenge who is saying that all right okay so we're gonna put this in a list comprehension and we're gonna we're gonna check out okay well cool how any thoughts of how in the world we would it's not all right okay well cool it's no no no need to have nightmares i already have some so let's just go ahead and look at this i'm going to go primes so we're going to build a list with list comprehension so we're going to we're going to get our brackets and for i in range so i'm going to i want to check the first 100 numbers so i know one is and if i want the first 100 numbers i'm going to go to 101. now that's our that's our header okay all right are you good there all right so instead of the body being underneath just like so i goes at the beginning all right this is the order i want you to think about making a list comprehension so i have for i in range whatever my iterable is now at the end of it is our condition and it's literally this simple if is because now we're going to call our function is prime i all right so let's run this boom all right yes shouldn't shouldn't there be i for i absolutely and if you're to that point where you can just flow that out that is absolutely fine but i like to show the the way to to deconstruct a for loop header and body than to do it in that order so you have your your header your then your then your iterable your excuse me your itter here's your iterable forgive me for misspeaking then here's your iter and then here's your condition so your your itter goes in front of the four all right is that a little bit better is that that oh is that a little bit less nightmarish and i get it i remember the first time i saw this especially with scenarios and then you have these over here and you start doing stuff to this and it's just like i don't get it and then there's actually more well because a lot of people like to show off and just good that's the point people then jump into this and they have net a nested list comprehension i'm not going to show you a nested list comprehension for a while because sometimes that's can be a little extra extravagant but maybe next week we can show speed i think that's a good idea because now we're going to work on our guessing game this went a lot faster than i wanted to so now we're going to build upon this and you could even go and build this and have a a list of a scenario of until this is 1000 so that would be well you guys you guys are awesome and like i said i want you to well cool but i want you guys to understand i promise you you guys are much further along than i was at a month i know it i mean if you're already uh building uh a bot i i didn't even understand what that was and having to have i mean it took me forever to get what a module was i mean when the first time i saw this i said well how how did they get this to come out well it's in the file what what file oh this is the name of the file no it's called this yeah i know that's the name of the module this so trust me just spit in the just said spend the time i don't know if you guys uh watched the video yesterday on my channel but i promise you just show up and look you guys are here every week you guys are getting this you guys are asking a lot of great questions you guys are doing good all right cool let's go ahead and jump into our guessing game so we got a lot of cool stuff to deal with the guessing game all right let's comment this out because we don't delete code right everybody we don't delete anything of code all right guessing game so we are going to need to come up with how we're going to do this so we got to where our first problem is a random number right how do we do random numbers anybody remember what tools do we have to get us a random number going oh i lost my so we need to get import random random yep and then which which one to deal with random oh my goodness i am so sorry everybody all right if i just want one random number let's say from 1 to 20 what do i use 763 lines of code sequences pick random elements pick random sample uniform within range uh let's see anybody remember randy int randy ant that's okay uh [Music] so so randent is okay oops there's another comment rand because then random range we'll deal with that later but randint is sufficient so we need to uh pick and have have our number equals brand int and how to remind remind everybody what does randint do this is the only time that that i can believe has that b is inclusive and i want you to look right here this is this is math and only if you're nerdy math like me you get so open open a bracket and a parenthesis tells you the yes and that's fine that's again you don't know these things until you know these things and i mean i couldn't remember i could not remember anything but you do this stuff 10 hundred hundreds of times you just you just know what to do i mean you may not know that everybody wants to go and get a hammer the first time they're working on tools and a certain type of screwdriver well then you learn that there's more sophisticated tools and you go from there again you don't know what you don't know they're called unknown unknowns well we're trying to remove as many unknown unknowns as possible so here we go we have our we have our first problem solved well guess what we need to have something go over and over and over and over again so we're going to go 1 through 20. so we need to do something until something stops so guess what we're going to do while true now let's see what'd we learn last time of how it um would we learn how to handle last time taking input from the user if it's if it's wrong so we need to get ahead of that right now so we're going to try accept and what was our what was our exception all right oops please enter a number and i made a boo-boo i should have put pass here just in case something happened so all right passes hey i know i have a header and now i have you can in this situ in this very small situation but you guys are already sophisticated enough that i want you to get into the habit of this when i have people who don't even get this concept at all i just have them do accept but that habit is then you do that and you grab all exceptions well you want to be as focused as possible and what we just learned about this explicit is better than implicit so with us putting here value error we are explicitly catching that one error and we will hopefully we'll have time and we can work together and we can grab other errors and more sophisticated but then you just have these go through but you can you can but just want to be clean and clear and explicit in everything that we code and especially the things that i want to show you i would probably show that on my channel i think i've done that before but here on free code camp i want to make sure that i'm showing you guys the best the best of best practices no no no no whitewashing the fence so all right so let's just go ahead and uh finish it out so now okay so now we need to so we have we have the computer it's grabbing a number so what is the point of this we went now we're going to do tests of we want to compare what the what the computer picked to what to what we're going to guess so first of all so we can really kind of make sure that this works we're going to cheat a little bit and we're going to have this print out on the screen awesome nice catch thank you so we're going to cheat and also we want to make sure that our tests and our scenarios are correct so we're going to print out the number but now we need to take input from the user to compare right so we're going to have the guess oops the guess then what is our all-time problem that we have int input would i say please enter a guess all right so now here's here's where the fun starts now why'd that happen anybody know because i can't count so i know that that's now there saboom okay so now we are so let's check this 17. so first let's handle our first problem oops please enter a number 17. all right so here's our here's our first dilemma that i guess 17 and nothing happened so let's handle that first so we can get ahead of that and we're gonna have some excitement with this and uh it's the reason why i like this exercise so much is you've really got to you really have to understand workflow and you can make it extremely complicated or if you're like me you like to make things super super simple so you can remember how to do it so we have a while loop and then we need to learn how to handle this actually no we need to handle one other thing we need to actually then have a second while loop yeah sorry got ahead of myself you guys you guys are so good and smart i get so excited and i get ahead of myself i think it was last week yeah where we started doing uh i almost forget what yeah i need to go back and look at my notes and actually see because i i think we skipped i think we skipped what i kind of wanted to talk about because uh we got into the um yeah i need to go back and check because uh we got into the uh horse race and that was very cool that's one of the uh 25 horses yeah if you guys missed last last week's that was very cool we uh we did some cool stuff that was an interview question i ran across a while ago it's probably not one anymore because everybody knows the answer all right so now we need to have a loop here so while guess not equal and old sam would be having a panic attack right now so all right so what we what we're doing right here is we need this loop okay kind of cheat a bit and use my notes and that's fine that's fine look it's not cheating to go back and look what you it's your work it's what you've done i still google stuff all the time oh my gosh what does that do what's this error look i i read this one tweet that um from this data scientist i spend more time googling my errors than writing code look if you're not taking somebody else's work it's not cheating so if you're having to look up an error if you're having to look back at your notes that's the point of this is to go oh i don't remember exactly how i did it but i know i did it but i know i have it here that's why you don't throw anything away that's why you don't delete anything and that's why you definitely see save things to the cloud and make sure you never yeah don't don't leave any code that that that's funny well then you can uh check out uh free code camp all their awesome videos or python basics for all all of uh those things because that that's the that's the point and that's what beau and i were talking about about having all of these lessons that i have all compressed into streams that everyone can come back and watch all right i digress so but the reason why i would have had or old sam would have a panic attack is true and false was already um bad enough and then now we have a knot here but the way that i was okay and was able to comprehend this is you're going to do this as long as this is wrong so that's what i want you to think about you're going to continue prompting the guess of you're going to check you're going to continue to check because if it's not because you have how many scenarios do do we have any any thoughts we have we have we have certain number of scenarios and we have to handle each of those so right now we're handling any improper input so we actually have uh i don't i got you that's funny all right so we actually have four scenarios bad input correct guess guess is too high and guess is too low so we actually have four bad input solve that uh right now we're going to handle it if it's not the right guess so we we can just go ahead and and start there all right so uh if guess is greater than number sorry if i guessed if the guess is greater okay the guess is greater please please do please and please guess a smaller number i don't know if we want to put a sentence on there all right so that's part of it then i'm going to then take another guess right and then or here let's just let's go slow print so that we have guesses too large so then we need to do hang on hang on i missed a couple cool yep well yeah jan i don't know if that was you or we but yes we we got this right here then we have so i think it was our scenario where we had a nested so it's not right and then we have then two subcategories of not right we're either too high or too low so then we need to handle these two and two of them is a slam dunk we got an if and an else so then please guess a larger number all right now we've got a little bit of a problem so it's one okay i'm guessing one and here's our problem anybody see it it's just continuously going so what do we need to do that's just running and we're now 20 62. so we need to re-prompt right all right i know i know i know i know i know i know i finally found a scenario that it's okay to copy but don't copy okay i even i even messed up i don't even let myself copy uh okay you think we'll get there all right so five smaller number three okay guess a larger number all right so those two work those two work so then i guess four but then i'm all right so here we go so this is how we're going to then so you could then test you could do an elif but i want to show you something that is very cool and i'm going to show you something else so um all right guessed the correct number this is what is very cool about this and not a lot of people are shown this and then we're going to handle just like we did last time all right so it's 10 so i'm going to guess 8 guess a larger number 11 guess a smaller number 10. okay but now i need oops and then right here so what we did is then we need to then have a issue right here of do we want to play again so we get out of here because i'm up here guessing because i'm going to show you this i forgot i changed this to inside the try so now we need to do a question and i'll show you the scenario why we need to put it here put you can do the break it will work but i just want to give you yes because while this is what i want you to think about while true right what does else do what does else grab else grabs the false right bingo so that's why we are pairing the while and the else and then we need to then test here to get out of this loop because in my original because look this is a perfect example is i've written this probably 20 30 times over and over and over again and mate actually that might be something neat because we're gonna have a little bit of time i will show you some of my old garbage code to just because look i can say it that you guys are much further along here's a looping alternative yes absolutely that's the way i want you to think about it else is the the other option bullion you have two choices i think i'm in frame i need to learn about where i am you have either true or false and that is the basis of a processor that circuit is either open or closed everything else builds from there all right that's what i want you to think about you have to think about very binary can i get this down to binary or as close to or then start alleviating all right so yeah that might be something cool to do so i'm going to show you this i did not think i needed to build all this at one time and then i'll show you exactly why we could put this outside the loop but then we have an error and you'll get a bug and those sometimes are so fun to find i remember the first time i built the times table i actually that might be cool i might show you the i think i didn't break my rule yet and have this all to play again all right yes no do do do do then what what do we what do we learn how to do lower than if q 0 equals lower in break all right there we go so we got kicked we're kicked out of here kicked out of here right uh okay 11 guess higher 13 guess lower 12. you guessed correct would you like to play again no awesome it worked all right oop that's not where i want to go now now let's show you i remember uh one iteration i ran through was that while i was getting my notes around so i looked at it and i go well i don't need this because i think i was i was wanting to i was wanting to see how dependent this was so let's comment that copy this and i think i put it here yes so it gets outside of my exception so i said okay let's check this and i think let's see see if i can do this on purpose um ah and there's one more bug that i almost forgot about that we need to then handle because right now sorry i really like working with you guys i am very sorry sometimes i maybe at some point i will get so used to you guys asking some really good questions and um i won't i won't get as uh get as excited but no you guys you guys are phenomenal you guys are great great students great learners and really good questions so now i've moved this down here this is going to create a bug and i'm going to show you why let me let's see if i can make sure i do this on purpose okay all right so 15 17 16. ah shoot i thought ah here we go all right so i want to i have to rethink about what that bug is all right let me show you this problem oops please enter yes so everybody look at what that number is right now so i'm going to go 6 7 oops 9 8. you want to play again yes huh what are the odds that it's still eight yes okay now this is becoming astonishingly was that it did i get it to do it okay all right what are the odds that our guess is ate every single time anybody have any guesses of why what flow shift down there um okay all right all right let's talk about the bug that and i can't get the other bug to work um here but i just wanted to show you uh this let's comment that out actually it might it might show up here all right so did anybody notice that i got eight is the random number every single time anybody notice that so how do we solve that anybody see the problem in my code anybody see it yet here so i'm in this loop going over and over and over again but this is not so this needs to be here see where it needs to go right inside right here so now when i guess should i play again yes 17 oh yeah 147 so is that guess the smaller number 17 would you like to play again yes so now this is where it needs to be actually let's check and uncomment this out and see if this grabs it all right uh nine oh i know what it is now hang on this is this is the problem so if i hit no here um okay i guess the bug is gone i could have sworn that was it but yes i did want to show you this right here and you're exactly right this is a true and if it becomes false grabs here alrighty so no that is that so we have about 36 minutes generating remember inside the wall abso absolutely right we needed to move that down if we wanted this to truly truly repeat all right let me see where we are with this well we went so much faster all right this is a good one did we do leap year yet anybody talk about okay let's look over and comment do do have we done leap year jan does anybody alright you guys know lee pierce all right who knows the definition of a leap year i bet you a nickel you do not know because i thought i knew and i turned out i did not know so i thought i would have bet any amount of money that i could explain what a leap year was and i would think i was 40. so three years ago and i learned that i did not know what a leap year is anybody want to try for a nickel and i will oh okay a leap year is a year exactly what are the what's the what's the rule for a leap year i'm sorry i wasn't saying what's what's a rule for a leap year any comment any thoughts because the first guess that everybody tells me and i would have and i said the exact same thing i would have said the exact same thing it is a year that is divisible by four that is partially true there are two more there are two more scenarios so first has to be then almost happens every four years so the so 2000 was a leap year right i don't know if you guys you guys were more than likely alive but maybe not that old so 2000 was a leap year is everybody aware of that but also 1900 was not so here's the rules and we need to build we need to build a function of let me get over we're going to build a function to test this so all right so 2000 was a leap year but now here's the kicker 1900 was not a leap year and the reason why is because it is divisible by 100 and not divisible by 400. so i'll say that a couple of different ways so when you get to the century mark it's every 400 years so i get to tell my kids my kids were going a little bit after 2000 that i'm the first one to have to have a leap year on a century since 1600. so here we go so here's the rule of so sixteen hundred was a leap year because it is divisible by four sixteen hundred divisible by one hundred and sixteen hundred divisible by four 400. that is the definition of a leap year so 1900 is not a leap year because once it is divisible by 4 by 100 it then immediately has to be divisible by 400 and you have a remainder of 3. so that is the rule every single year is divisible by every every year that's divisible by 400 excluding the century marks are except every 400 years now let's build a function to test that is everybody's mind blown right now because i remember the first time and i would have bet any amount of money for any value and i would have been mad about it that i could have told somebody what what uh what a leap year was all right we ready to do this okay so we need to go slow and we need to get this figured out so we got leap year so what'd we learn we we just learned so uh 1992 we're gonna check then 1600 and 1900 2000 and then we'll check 2020. what do we think about that does that sound pretty good i won't i won't uh i won't take it from you but that's one of those things that you keep walking around i remember uh i remember i told my dad about it and he he wanted to get he wanted to get mad he he does not like it when i know things uh that he does not and this is why i don't enter yeah i look i don't i don't i don't bet but i i would have like i said i would have bet any amount of money i don't but um all right so we need to go we need to go and think about this this is going to be this is going to be fun so you guys you guys help me how are we going to do this leap year so we're going to test a year so we got that set up so what's our first what's our first scenario so it has to be what before we before we even waste any time right how should w what should go here i guess i can pull this over we don't have any more lots of documentation we have to do all right what what should go here divisible by four all right if year modulo four equals zero all right so now all right good okay then what what'd we learn now here's where the true and false get real fun real fast i think i can have these ooh i don't need to see me somebody type okay all right all right so then now all right so let's look let's get this um we'll do pass then we'll get this uh oh you want to do that one already cool all right so if then x divisible by 100 equals zero then what then what so i like how you're doing this okay so we're we're just we're just going through then so we got 400 then we checked 100 then okay if 400 yep so 4 100 400 it's a it's a leap year right return true okay who's ready to do a bunch of else's oops all right so huh didn't think oh no need to get that nope because it's just a it's just a scenario it's just a one one time one time scenario you don't have to go through thank you all right great catch all right so we have our first true so then inside this which one will this be else what what's this one exactly all right so we'll work our way back out so if this scenario boom all right so then i back out one more right what's this one any thoughts it's a little backwards look you guys i'm gonna have to start hiring you guys to be my copy uh my editors alright so what is this else other than you guys checking my my spelling all right so then we go okay so then this is weird okay return true else return false all right so let's look at this and let me check mine true false true false it looks weird but let's go through it so now we have let's build this so we're going to check these up here here are my years years equals we throw these in 1992 1600 1900 2002 2020. okay all right so four year in years and that's fine look look you guys i would have never ever ever participated in a chat on when i was learning especially at a month i'd have been terrified look you okay if you if you haven't seen the video uh yesterday i'll try not to take it personally but look you only get better if you stretch your stretch your wings all right look you have got to mess up and especially when you're i want you to think about this we are completely pushing the limits of technology every single day and they don't happen because of we accidentally just it showed up no we tried something we broke it we tried something it didn't go it went horribly wrong i drive my kids nuts when i talk about the quote from thomas edison he does not say he discovered how to create a light bulb excuse me he doesn't say he invented a light bulb he discovered the way that a light bulb worked he removed all the other options that were wrong and the only thing that was left was a light bulb over ten thousand experiments of what didn't work he happened he removed all of them it's like a sculpture i want you to think about that the sculpture is there inside the rock michelangelo used to say that all all the time all i do is remove the excess you have got to try something break it and learn from it and go from there all right i know i just went off and off and hopefully not a lot of people just quit bo won't let bo won't let me back all right okay so here we are um print leap year uh year did i call the right variable okay and i close that out and know what i do wrong and i did not close it out okay otherwise man once told me if you ask a stupid question you only like until you hear the answer yeah uh if you don't ask it you'll lack knowledge for the rest absolutely i i remember when i a lot of parents struggle with why because it it takes a lot of time and it's a lot of energy it is a lot of energy all right so let's look at i guess i should you know what i should do so i should probably have year printed there and we could put that in our handy dandy f string maybe we can do that in a minute but all right uh why why why why why why i love that question now i love that because look you only get better if you ask why and if somebody you're working with doesn't tell you why uh absolutely i could not i could not say that better i want you guys to grow i have the greatest time being here and i am being extended the wonderful opportunity of um having being on this channel that um quincy and bo are allowing me and i just hope that you guys are all getting something out of this not just programming but stretching yourself pushing yourself uh and going from there so all right uh here we got we got 1992 true 1600 false 1900 true um ooh no that is backwards hang on oh my goodness what'd i do wrong false false true oh we need to fix that well here we go guys where did i let me check my stuff over here oh will this come over here oops yeah i want to kill it sorry i need to uncomment this out and run this true false true oh anybody else catch my awesome awesome mistake there we go here we go okay again you guys i can't blame that stuff on you anymore you guys are you guys are awesome all right so guess what i left out a very big important scenario right here of testing that this is a true false true false and this is back supposed to be true let's check this again false false true true true there we go because if you missed it and i cannot believe i did that but i left out a condition of equal to zero this modulo equal to zero so all right we got about 18 minutes let's uh let's jump on something new so we just did just did that um let's see pull this up is that going to pull over there so i can open that let's bring that over here because we flew through through these a lot faster than i was imagining so ideas i'm looking for h i that's not right let me say bear with me guys like i said you guys are uh fantastic okay actually here's here's some here's some pretty good stuff oh hang on all right he's playing tricks on us always with the small things oh absolutely uh well i can talk to i can speak to that uh a ton so i well my spelling hasn't improved uh maybe marginally but my typing has and also if i haven't said this yet i became much more sharp-minded by having to focus on making sure the variables matched up and making sure i was typing correctly um and the speed of typing my and i know i'm not a fast typer i'm not i'm not saying anything like that but i am much faster than i was before so let's actually look at a couple of things so let's take a list and i don't think we have done this yet so we have we have a list of names and we're going to go let me just grab these names copy them put them over here so i'm going to show you the long way and then i'm going to show you some of the built-in functions well yes my younger son he has a mechanical keyboard and he loves sometimes the clicking just absolutely drives me bananas but all right so let's look at another way so we have for name name in names print name right all right well i'm going to show you how to think about this because there's going to be times there's going to be a time at some point and you're going to need to know how to think about this and going through and thinking about the the the index i don't think we've done he's trying to kill his keyboard that's funny all right so then we go lynn lynn names so let's look at this blend names when names all right would that do and if i could get an s in here for the love of all that is good it's all right let's look at this for a second so i think i showed you this so when you call der without anything you see everything that's in memory right now right so we got horses sitting around out there we got name we got names we got numbers we got race we got random we got shuffled so name is the last iter here so i accidentally ran lynn on name and steve happens to be the length of five well i want the land of names i promise guys i will figure this out three because there's three items inside names and we do help on len and we get return turn number of items in a container all right so string is even a container hang on what is it oh that's messed up that's the keyboard killed his father okay all right so now so since this is a since th this is another garbage collection video yes i uh was that you that asked about it i could not remember yes i um that was very intriguing i i think that would be a very good idea i don't think that would blow everybody away because actually that's kind of my claim to fame um i actually made a tweet um a long time ago and um gordo uh hearted it because that was actually the one of the premises there's tons of premises of why python became python and was created but it was so memory allocation was not important it was it was going to take that away from the user to enable the excuse me the the the programmer to um to be more free and it would it would free up time and be able to because that's that's one of the things that stumped me with c plus plus and just of just a variety of things but that that was that was um one of the points was memory control and memory allocation that was one of the top priorities of it so yes i actually think that's a very good idea and i don't think it will be over too many people's heads and especially all of these awesome new subscribers that um i've gotten but yes i will get some stuff around because i don't think a ton of people are super interested in the django um series so i'm gonna try to wrap that up as fast as possible and then we'll move on to some other cool stuff have really gotten some really good really cool suggestions but all right i digress let's finish this out in the next 12 minutes so since this is a number an int and so then we can wrap this because again this is completely legal because python understands it goes hey you know what you're talking about you're passing a number in here and we're going from here so now so now i still get um names here we go so i'm gonna go here apparently i will never use names again since i cannot um keep the difference between name and names all right so this is completely legal so now we're going to have somebody looking at this and they're gonna go zero that sam is zero there's zero person so guess what this is how we solve this one plus one completely legal because again python goes hey you know what you're talking about completely legal oops there we go now now let's look at um check this out so i so we need to change this to i since we got rid of names that's more clear so but let's come back over here and look at this again lend names nailed it all right so we got 0 1 2. so down here we're going to solve it here so check this out 1 2 3 4. names i alright so what are we doing anybody anybody got any guesses so i'm actually using the range function to index through now that was a lot of work to show you this has anybody seen the built-in function that does this exact same thing that i just did with the tools that we have so far any i almost want to say anyone anyone but i doubt anybody i don't know if bo or quincy are still watching to get that reference i might send some real money if anybody gets that one that is an old movie from my error index bingo i am indexing fantastic so now oh yes i'm using index oh i see what you're saying index has anybody seen enumerate anybody seen the enumerate um function anybody seen that yet does this exact same thing just we don't have to do any extra thinking okay all right we need to figure out a better way to faster not better the chat's good i've used it but you haven't shown it okay well what does it do and that is very helpful that you guys can help me eight what does it do it's actually very cool so it shows the index value and value bingo what does it create so you have an interval starting point creates a pair where's the default anybody know that if i say default what do i mean what information you have tuple very good creates a tuple because whenever you see pairs and then it even hints right there defaults to zero so all right let's check this out so we got names right then we got let's just do new i remember numer or eight names new i remember i spent more time just forgot this new equals list new new forgot that part all right bam check this out so uh then when i do new up new index zero wrap that tuple very good so what this does and all right so default argument keyword argument um but it is uh default to zero already set so it starts at zero but i could come in here and change this oh yeah yeah yeah yeah yeah let's do this this is good have we done packing and unpacking yet anybody got a couple minutes we'll get we'll get into this oop and i just broke my own rule all right comment that out for i in enumerate hey all right names starts at zero i want to start at one sorry one print i so what am i going to do right here i get a tuple i did not talk about packing and unpacking awesome okay uh five minutes i think i think we can do packing and unpacking in five minutes so we have a pair these are set together so i right now because it's our last item so i is still there so num and name equals i [Laughter] uh what i what did i just do i it didn't throw an error so something is completely legal so i just unpacked this because i i is a tuple has a len of two i passed it two variables python goes in breaks this down unpacks assigns because it's just like this just like that so i want you to think about this so i is this just like this so i have x and then y and it goes in and just links the two of these together oh very cool well that's awesome and unpacks this next video we'll look at we'll look at uh packing back but this unpacks this so so if i have i right here and each time through this is this is a set this is a tuple so let's run this again oops sorry so this is my tuple so now i can come over here copy paste comment num name all right so what don't don't overthink this same so what this is is this is unpacking this item print num name go through boom so there we go i think that is a fantastic starting point and i promise promise promise and i'm gonna save this right now i did not save the um the file the shell the first time but i did shave shave save the file they the shell um shell shave save the shell wow say that three times fast save the shell the first time but i did save the shell the of everything that i typed in the meantime so we'll at least have that and i will be doing that going forward but absolutely awesome stream today i really hope you guys are having as much fun as i am because i really i really get a lot out of this and i have a grand grand time so i just want to tell you all thank you very much um i really truly enjoy these anything that you've seen here i've tried to have a more in-depth video over on my channel so if there's anything you want to see just bounce over there thank you everybody for spending time quincy and bo thank you for extending me this wonderful opportunity and we'll just keep going and we will see where this goes but as always guys thanks for watching stay tuned and we will see you guys next week bye guys
Original Description
Learn the basics of Python live from Sam Focht every Tuesday. This is part of a series that will cover the entire Python Programming language.
Check out Sam's YouTube channel: https://www.youtube.com/python_basics
Python Basics with Sam playlist: https://www.youtube.com/playlist?list=PLWKjhJtqVAbkmRvnFmOd4KhDdlK1oIq23
--
Learn to code for free and get a developer job: https://www.freecodecamp.org
Read hundreds of articles on programming: https://freecodecamp.org/news
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from freeCodeCamp.org · freeCodeCamp.org · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
React: Production Server Setup Part 2 - Live Coding with Jesse
freeCodeCamp.org
cookies vs localStorage vs sessionStorage - Beau teaches JavaScript
freeCodeCamp.org
Browser history tutorial - Beau teaches JavaScript
freeCodeCamp.org
Graph Data Structure Intro (inc. adjacency list, adjacency matrix, incidence matrix)
freeCodeCamp.org
React: Parameterized Routing with Next.js - Live Coding with Jesse
freeCodeCamp.org
React: Dealing with jQuery Issues - Live Coding with Jesse
freeCodeCamp.org
setInterval and setTimeout: timing events - Beau teaches JavaScript
freeCodeCamp.org
Browser and Device Testing - Live Coding with Jesse
freeCodeCamp.org
Last Minute Updates - Live Coding with Jesse
freeCodeCamp.org
Post Launch Updates - Live Coding with Jesse
freeCodeCamp.org
React: Setting Up Google Analytics - Live Coding with Jesse
freeCodeCamp.org
React: Masonry Layout - Live Coding with Jesse
freeCodeCamp.org
Load Balancing Digital Ocean Droplets - Live Coding with Jesse
freeCodeCamp.org
try, catch, finally, throw - error handling in JavaScript
freeCodeCamp.org
Load Balancing: SSL Passthrough Setup - Live Coding with Jesse
freeCodeCamp.org
Graphs: breadth-first search - Beau teaches JavaScript
freeCodeCamp.org
React: Masonry Layout Part 2 - Live Coding with Jesse
freeCodeCamp.org
React: WordPress API Live Search - Live Coding with Jesse
freeCodeCamp.org
Creating WordPress Custom Post Types - Live Coding With Jesse
freeCodeCamp.org
Dates - Beau teaches JavaScript
freeCodeCamp.org
Miscellaneous Front End Updates - Live Coding with Jesse
freeCodeCamp.org
Merging a Pull Request from GitHub - Live Coding with Jesse
freeCodeCamp.org
React + Prettier + Standard JS - Live Coding with Jesse
freeCodeCamp.org
React: Sortable Responsive Table - Live Coding with Jesse
freeCodeCamp.org
Geolocation Sorting by Distance - Live Coding with Jesse
freeCodeCamp.org
Tradeoff Matrix - Agile Software Development
freeCodeCamp.org
The Definition of Ready - Agile Software Development
freeCodeCamp.org
Getting first React job without experience - Ask Preethi
freeCodeCamp.org
React: Google Analytics Click Tracking - Live Coding with Jesse
freeCodeCamp.org
Submitting a PR to an Open Source Project - Live Coding with Jesse
freeCodeCamp.org
Should I go back to school to get CS degree? - Ask Preethi
freeCodeCamp.org
Hero Section CSS Changes - Live Coding with Jesse
freeCodeCamp.org
Working Agreement - Agile Software Development
freeCodeCamp.org
A day at Pennybox with Co-Founder Reji Eapen
freeCodeCamp.org
React: Sorting and Filtering Data - Live Coding with Jesse
freeCodeCamp.org
React: Sorting and Filtering Data Part 2 - Live Coding with Jesse
freeCodeCamp.org
React: Building a New UI - Live Coding with Jesse
freeCodeCamp.org
Definition of Done - Agile Software Development
freeCodeCamp.org
Getting started with jQuery (tutorial) - Beau teaches JavaScript
freeCodeCamp.org
Making a React Blog with WordPress Content - Live Coding with Jesse
freeCodeCamp.org
React, NextJS, CSS - Live Coding with Jesse
freeCodeCamp.org
jQuery events - Beau teaches JavaScript
freeCodeCamp.org
React/NextJS Routing and WordPress API Custom Types - Live Coding with Jesse
freeCodeCamp.org
React: Working with API Data - Live Coding with Jesse
freeCodeCamp.org
React: Refactoring Components - Live Streaming with Jesse
freeCodeCamp.org
jQuery effects - Beau teaches JavaScript
freeCodeCamp.org
More React Refactoring - Live Coding with Jesse
freeCodeCamp.org
animate in jQuery - Beau teaches JavaScript
freeCodeCamp.org
"Finishing" My React Site - Live Coding with Jesse
freeCodeCamp.org
Starting a New React Project (P2D1) - Live Coding with Jesse
freeCodeCamp.org
React Project 2 Day 2: Learning Material UI - Live Coding with Jesse
freeCodeCamp.org
The Agile Manifesto - Agile Software Development
freeCodeCamp.org
jQuery: get and set with http, text, val, and attr - Beau teaches JavaScript
freeCodeCamp.org
React Project 2 Day 3 - Live Coding with Jesse
freeCodeCamp.org
The INVEST approach to product backlog items
freeCodeCamp.org
React Project 2 Day 4 - Live Coding with Jesse
freeCodeCamp.org
Chickens and Pigs - Agile Software Development
freeCodeCamp.org
React Project 2 Day 5 - Live Coding with Jesse
freeCodeCamp.org
jQuery: add and remove DOM elements - Beau teaches JavaScript
freeCodeCamp.org
React Project 2 Day 6 - Live Coding with Jesse
freeCodeCamp.org
More on: Python for Data
View skill →Related Reads
📰
📰
📰
📰
Future-Proof Skills That Will Stay Relevant After AI
Dev.to AI
Artificial Intelligence: How AI Is Changing Our Daily Lives
Medium · Machine Learning
Why CBAM Is Making Carbon Intelligence the New Business Currency
Medium · AI
Chinese AI Models Went From 2% to 45% of Global Developer Traffic in 12 Months.
Medium · AI
🎓
Tutor Explanation
DeepCamp AI