Five Python mini projects for complete beginners in this video. each of these projects should n't take us longer than about about 15 or 20 minutes to code
... [Show More] out. the five projects are a quiz game, a number guesser game rock paper Scissors choose your own adventure and then finally a password manager. if you 're a complete beginner, you should still be able to actually code it out and understand what 's going on now. If you guys want to skip to a certain project you do N't want to go through one of them. Whatever there will be some timestamps in the description and kind of chapters on the video timeline so feel free to skip through to whatever you want. the first thing I 'm going to do. Here is start working on the quiz game, so this quiz game the idea behind it is we want. to ask the users a bunch of questions and then if they give us the right answer to these questions. We 'll kind of add one to their score. Then at the end of the program, we'll print out what they got out of the number of questions..
If I run my program, so I press the run button It says welcome to my computer quiz. Do you want to play say yes and then it prints out yes right so pretty straightforward okay so now that we know if the user wants to play or not right because after this line is done. We 'll have something stored in playing. We want to check if the users typed yes right. if playing does not equal 2 so an exclamation point and then the equal sign and then I 'm going to say yes, Then what I want to say is what the user says. if I 'm writing what 's known as my condition. This is the thing that I want to check is what the user typed in is not equal to yes so what happens here is we 're going to compare whatever the user. type in with yes so if whatever the condition is is is true, then whatever is indented after this colon here is going to be run so hopefully that makes sense. user. If we want to play. We 're going to say some variable I'm just going to call it answer because that seems to make sense is equal to and then input. then input and then I'm going to put whatever the question is I 'm going to ask something about a computer. I 'll say what does cpu stand for question mark and then type out what the actual answer is now In this case. This is central processing unit..
We're going to remove all of our answers and questions and we 're going to type in well new answers and new questions and I 'll show you some more things that we can do here in kind of some fixes and all that as we go through, but let 's just get our questions done first all right so now my next question. I'll say what does Gpu stand for question Mark. the one thing that I want to show you though is that we might be getting some kind of weird results from our program that we don't expect so I 'm going to run my program and say do you want to play. the reason for that is whenever you have a capital that is different than lowercase right so if you have yes that is not equal to yes. These are different strings and so if. We want to check if the person 's answer regardless of the case it should be valid and to allow the user to play. We need to do something. the last thing I want to do here is implement some notion of score right. We want to be able to tell how many questions our users got correct. So what I 'm going to do is just take your answer converting into lower case and then you 're checking if the lowercase answer is equal to well the lower case answer you actually have all right..
Using a concatenation operator in Python, Python can display how well the user did in a program.. At the end of my program, we 'll have some number right. We'll have two three zero zero zero whatever However, many questions we got right. We can then use that to display how many correct answers they have.. I 'm trying to make sure this video works for everyone regardless of your skill level and now I will go a little bit faster. I wo n't reexplain a lot of the syntax that I 've already explained now as we move into the new projects just anything new that I kind of come across that we use I will explain but this is our first project. This is the quiz game. a link sorry that has this code in the description if you want to download this yourself, but I would highly. Recommend you modify this you know change around Maybe add like more than one point for questions that are worth. You know more than a point that are more difficult or something like that right and you guys can do this as you please regardless that is the quiz game. Now we 're gon na move on to do a number guesser.. [Show Less]