One of the fastest ways to become a developer in 2024 is follow a structured curriculum and to get insider knowledge from seasoned professional, if you want to learn more I have a free 1 hour course breaking down the exact steps to take to land a position ASAP: techwithtim.net/dev
@@aaronabishekecs3056if you completely copied then no don’t add it unless you can recreate one your own add some modifications and in general bring something of your own that you learned thanks to them ( correct me if I’m wrong )
00:02 9 hours of Python projects with increasing difficulty 01:53 Using the print function to output information to the user. 05:27 Using if statement to check user input 07:22 Using if statements to check conditions 11:02 Creating and testing quizzes using Python 13:04 Understanding Python syntax and 'if-else' statements 16:55 Implementing a scoring system 18:39 Converting a number to a string is necessary for valid operations with strings. 21:59 Creating a number guesser game using Python and the random module 23:32 Generating random numbers in Python using range, randrange, and randint 26:53 Converting user input to numbers using the int function 28:40 Checking input for number, generating random number, and prompting for guess 32:12 Handling user input and validation 33:49 Using the break keyword to exit a loop 37:10 Determining if a guess is above or below the random number 38:36 Implemented an L If to make the code cleaner 41:50 Checking user input for rock, paper, or scissors 43:35 Using 'not in' to check for invalid user input. 46:47 Lists are collections of elements accessed by index. 48:39 Deciding the winner of the game 52:04 Implementing a rock-paper-scissors game with user and computer wins count 53:54 Create a Choose Your Own Adventure game with customizable options. 57:18 Creating a basic text-based Python game with user input and conditional statements. 58:57 Giving clear instructions for user input handling 1:02:33 Creating if-else conditions based on user input 1:04:43 Illustrating the structure and nesting in Python projects 1:07:33 Creating a program to manage passwords and encrypt them. 1:09:28 Introduction to functions and their usage in Python 1:12:42 Using the 'with' keyword for file operations 1:14:17 File modes in Python 1:17:38 Using 'readlines' to read and process lines from a file. 1:19:18 Using rstrip and split to process data 1:22:39 Install the cryptography module for encryption 1:24:13 Installing and using the cryptography module in Python. 1:27:44 Creating and loading key files in Python 1:29:27 Loading and initializing encryption key and module 1:32:48 Defining and resolving security issues in storing encrypted data 1:34:22 Decoding bytes to string in Python 1:37:30 Creating a Pig game with Python 1:38:58 Creating a rule function to roll a die and return a value 1:42:29 Converting string to integer and validating the number of players. 1:44:14 Fix if statement error and simulate player turns 1:47:41 Implementing logic to stop game when maximum score is reached 1:49:26 Simulating turns in a dice game 1:53:09 Simulating a player's turn in a game 1:54:39 Simulating a dice rolling game with two players 1:58:24 Project one involved creating a dice rolling game in Python. 2:00:01 Using a text file to create a story operations program. 2:03:15 Read a story, find and replace words. 2:05:04 Extract words between angle brackets using Python slice operator. 2:08:38 Creating and using a dictionary in Python 2:10:33 Replacing words in a story using Python 2:14:30 Project 3 involves randomly generating math questions and timing how long it takes for the user to answer them all. 2:16:10 Creating a function to generate math problems using Python operators and random operands. 2:20:01 Using the eval function to evaluate expressions in Python 2:21:48 Implementing a loop to keep asking a user a question until they get it correct. 2:25:23 Calculating time taken for a task in Python using the time module. 2:27:16 Building a text-based slot machine project 2:30:29 Validating and converting user input 2:32:12 Function to deposit checks if the amount is valid. 2:35:22 Setting a global constant for maximum lines to create a dynamic program 2:36:56 Input validation and formatting for user-friendly interaction 2:40:07 Embedding values in strings using format method 2:41:59 Implementing a check to ensure betting amount is within balance 2:45:29 Setting up symbols and their counts for a slot machine reel 2:47:14 Generating symbols based on frequency of occurrence 2:50:44 Nested list representing columns, not rows 2:52:30 Make a copy of all symbols list to avoid affecting the original list 2:55:54 Creating a function to print the slot machine columns 2:57:36 Loop through all columns and print first value of each column 3:01:10 Adjusting the print function for the slot machine output 3:02:54 Printing new line character after every row. 3:06:13 Checking for winning lines dynamically in Python 3:07:56 Breaking out of for loop when symbols are not equal 3:11:38 Using the Splat operator to unpack and pass all lines from a list to a function 3:13:22 Create a function to run the game multiple times. 3:17:10 Fixed errors in function names and variable passing for smooth operation. 3:19:07 Created a slot machine in Python and won $11 3:22:21 Creating a function to input the number of racers and validate it 3:23:52 Using a while loop to ensure valid user input for number of racers 3:27:07 Function to check for valid number of racers 3:28:51 Running a Python program with Turtle module and function return 3:32:04 Setting up the screen and changing the window title 3:33:47 Basic turtle commands and screen setup 3:36:51 Using Python's Turtle module to move in different directions and angles. 3:38:41 Understanding the coordinate system in Turtle canvas. 3:41:54 Introduction to using turtle for drawing shapes and changing turtle properties. 3:43:29 Controlling the turtle's pen while drawing 3:46:50 Selecting unique colors for turtle racing based on user input 3:48:30 Creating and positioning multiple turtles for racing. 3:51:38 Turning arrows left by 90° to make turtles race upwards. 3:53:11 Using the setposition method to move the turtle to a specific position on the screen 3:56:25 Adjusting position of turtles for equal spacing 3:58:19 Positioning the turtles based on spacing and width 4:01:44 Refactoring the code to create Turtles inside the race function. 4:03:19 Using random movement in Python turtle racing 4:06:38 Finding the color of a turtle based on its index in the list. 4:08:21 Python Turtle race with five turtles and race mechanics. 4:11:35 Creating dynamic and flexible code with functions and variables. 4:13:05 Creating a typing test with text highlighting and styling. 4:16:13 Initializing curses module to take over the terminal and create a screen for writing text. 4:17:49 Printing 'hello world' and clearing the screen in Python 4:21:00 Running Python files and adding colors to text 4:22:32 Configure color pairs for foreground and background in Python 4:25:48 Understanding text collision 4:27:22 Creating a start screen for the game 4:30:32 Printing and overlaying user input 4:32:12 Implementing a while loop to continually ask the user to type something in and overlay it in a different color on top of the target text. 4:35:24 Adding Clear Screen and Exit Control 4:37:03 Characters have numerical representation 4:40:30 Handling backspace key input 4:42:03 Parameters in functions allow passing values with optional parameters. 4:45:23 Modifying color based on correct characters 4:47:11 Handling the completion of text and displaying words per minute 4:50:34 Using F-strings in Python to embed Python expressions directly inside of a string 4:52:13 Tracking time elapsed using start time and current time 4:55:24 Calculating words per minute (wpm) 4:57:06 Handling user input without blocking the program 5:00:19 Use the jooin method to combine list elements into a string. 5:01:53 The function brings the user back to the main screen and prompts them to play again. 5:05:30 Loading and selecting random lines from a text file in Python 5:07:02 Using random.choice to select and remove invisible characters from text file lines. 5:10:20 Create a countdown timer and play a sound effect 5:11:59 Playing sound and regulating time in Python 5:15:43 Formatting numbers in Python 5:17:30 Using ANSI characters to manipulate the terminal 5:21:08 Creating a password manager with dynamic settings 5:22:58 Generating a password with specified criteria 5:26:21 Generating random passwords based on given criteria. 5:28:10 Creating a while loop to generate a password meeting specific criteria. 5:31:41 Setting criteria based on presence of numbers and special characters 5:33:31 Python generate password function ensures password criteria are met 5:36:59 Function to generate password based on user inputs. 5:38:41 Fixing error in password generation code 5:41:47 Using curses module to manipulate terminal screen output. 5:43:21 Initializing and using the curses module 5:46:34 Creating a function to print the maze on the screen. 5:48:15 Iterating over a list and adding draw position in Python. 5:51:26 Expanding outward from a starting point to find the shortest path 5:53:01 Using 'Q' as a first in first out data structure 5:56:17 Using a visited set to skip processed elements and find the shortest path 5:57:58 Implementing a function to find the shortest path in a maze using a que 6:01:16 Using the put method to insert a tuple with starting position and list. 6:02:58 Exploring current position and finding neighbors in a maze. 6:06:20 Checking for obstacles in the maze and finding valid neighbors 6:08:01 Implementing the Breadth First Search algorithm. 9:15:44 Using pipe to communicate between Python code and external process 9:19:14 Python projects teach basic automation using useful syntax and commands. I thought it would be helpful ☺
Only decided to learn Python recently and couldn't believe I stumbled on this! And don't know what to say except to thank you for this really valuable resource. You are an absolute saint and don't know how else to thank you. With gratitude from the UK.
This is seriously the best way for me to learn. By actually doing projects instead of sitting through dry tutorials that don't give actual examples of where and why things would be used. I'm finding that as I go through each project, I'm coming up with things I want to add (such as extended stats at the end of the Rock, Paper, Scissors game) and I'm actually able to write my own code to do so. I feel like I'm really learning shit instead of memorizing for the sake of memorizing.
Hey everyone if you came here before watching this video, I can assure you that this video is ultra nice making your understanding of Python very very strong, literally this video gives you a powerful mind for building complex logic, GOOD LUCK, PROCEED WITH THAT!
I have subscribed to your channel. I have started watching a number of Python RU-vid tutorials, that I have not yet finished, just to get a basis for comparison, in teachers and in content. I must say, comparatively, that I really like, value and appreciate your teaching style. Your videos present well visually, as well as in your spoken manner. The fact that the font text size is easily visible and readable, is definitely a win for my aging eyes. The fact that your font size is easily discernable, really sets you apart from the competition. Thank you so much for the gift of your channel.
@@1PercentDaily I do coding for fun. So, Idk man I am just doing stuff like algorithms and pygame😂. This video was just a booster for understanding basics.
Thanks for this video! I noticed that there is a bug in the rock paper scissors game! If you pick the same thing as the computer, then it will give the computer a win. However, for anyone who reads this, you can fix it by adding elif user_input == computer_pick: print("You and the computer tied!") continue before the else statement.
Similar thing with the PIG multiplayer dice game. You can end up with two or more players with the same max score. As is the player with the lowest index wins according to the print statement. This problem can be solved with: winning_score = max(player_scores) winning_indices = [i for i, v in enumerate(player_scores) if v == winning_score] winning_indices = [x + 1 for x in winning_indizes] if len(winning_indices) == 1: print("Player", winning_indices[0] + 1, "has won with", winning_score, "points") else: winning_indices_string = ", ".join(map(str, winning_indices[:-1])) winning_indices_string += " and " + str(winning_indices[-1]) print("Players", winning_indices_string, "have won with", winning_score, "points")
Thank you so much, I have so much free time right now. Finished my finals and was bored af, good thing you uploaded this video. I'll practice them, and get ahead in new projects.
Great work! And i want to add by 53:45 rock-scissors-paper game you actually have one more if statement that controls if user and computer chooses same thing.
yep... happened immediately the first 3 guesses, LOL.... 🤣 It was like the computer was messing with me. but all you gotta do, in case anyone is wondering, is add another "elif" with the other "elifs", like this: elif user_input == computer_pick: print("It's a tie! Both you and the computer picked:", user_input) Fantastic video though
I just started yesterday python. I was watching lot of videos but today I saw your video. So easy to understand. Anyone can watch your video. Thanks for your hard work. 😊😊😊
I love this gem of a video! You picked projects that have entertainment value when you complete them, and you walk us through, so we can practice coding efficiently. Genuine thanks man.
The color can be returned from the color function - it comes back as a Tuple like ('green', 'green') so referenced by winnerColor = winnerColor[0]. This is useful so you can shuffle the turtle list each loop so the left most turtle dosent always have the advantage of jumping first. Nice tutorial.
I am currently studying cybersecurity. The addition of python programming to my clause will greatly be beneficial. You and other youtube content creators who make these tutorials available and, for free, are invaluable. Thank you on behalf of humanity.
Just started today with visual studio and came across your channel, followed along with the quiz programme. works perfect thanks so much, and you explained it so well. really enjoyed it and following along with you. looking forward to the rest of your 9 hour course, cheers 🙂
3:03:18 No need for the third print() in line 46, just remove the "end" part from the print in line 44. This way you are first suppressing the new line in the last column and then you are enforcing it.
In rock paper scissors if you get a tie with the computer you lose but your video is so helpful and teach us so much that you can fix it with 6 lines of coding. Thank you so much for this guide!!
In your second example poject, random number guesser, it does not work if we enter a negative number. Looks like isdigit() function returns False if we enter the negative number as it is treated as a string. For anybody trying to make it work can use lstrip() function. So the condition part of the statement looks like if top_of_range.lstrip("-").isdigit(): This should do the trick. But anyway a great video. Keep it up🥳
in the slot machine project, the nested if statement that checks if the amount is negative is useless since it will never get used, cause isdigit function doesn't recognize negative nymbers as digits so if we enter a negative numver the if statement that checks if it's a digit won't run, thus the nested if statement that checks if it's negative won't run either so it's preffered to write it as: def deposit(): while True: amount = input("How much would you like to deposit: ") if amount.isdigit(): amount = int(amount) break elif amount.replace("-","").isdigit(): amount = int(amount) amount *=-1 break else: print("enter a valid number") return amount this way using the replace function we remove the - from amount in case it existed and check if it's a digit so if it is a negative digit it will make a copy without - then it'll be recognized as a digit then we turn it positive using amount *= -1
50:01 If you are having issues with Expected ":" Pylance, I know that is frustrating but it is literally telling you to go ahead and put a : after "Scissors" so for example look below if user_input == "Rock" and computer_pick == "Scissors": Instead of if user_input == "Rock" and computer_pick == "Scissors" I know his webcam is in the way and hopefully this helps someone out. Great video TechWithTim I am getting more familiar with this software cause of you!
Love from India bro The clarity in your concepts is amazing . It was super fun and enlightening watching you . I got crystal clear as i watched project 1 and 2
Thanks for putting this together. Getting my bearings with Python and looking for examples and how they were constructed, so this is helpful! Feedback as I watch though... Project #3 -- Example of insufficient testing! :) As previously pointed out, you missed the case of throwing the same thing as the computer. You can put in a test for "if user_input == computer_guess:" that mentions the tie to the user before a continue, with no scores being incremented.
The reason random.randrange(1, 10) will only generate a random number btwn 1 and 9 is b/c of indexing. In a list of numbers such as [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]. The list has 10 elements, but Python indexing begins at 0. This is 'why' element 10 will not be generated. 10 is exclusive b/c at element 10 we are at index 9. Element/Index relationship: 1 = 0, 2 = 1, 3 = 2, 4 = 3, 5 = 4, 6 = 5, 7 = 6, 8 = 7, 9 = 8, 10 = 9. Using indexing we can't get to element 10. Good vid!
Wow - this is amazing! Thanks a ton! I shall indeed save this link so I may come back to it repeatedly (after I've finished my Unreal Engine learning I've recently started)
Just a suggestion. Explain your question with written text exactly what to do. Because if one wants to solve this on their own first then it will be helpful for them. Anyway you are doing awesome stuff. Please continue doing.
Great video, in the first project, I wanted to go a bit further so I used chatGPT so that now my last question is how much battery your computer has, and it is working. I aslo tried to add the score-system myself and it worked and then i saw the rest of the video and it was the exact same thing I did.
Thank you Tim ! You really make sense of what coding can be by showing examples most of us wish we could find as beginners! Imo you translate the language so effectively and efficiently!
You can use this same project to introduce lists and reusable code functions to beginners where the questions and correct answers are stored in two lists, and one function that poses the question and checks the answer based on index passed in and then can give the score percentage based on num correct vs array length. Just a thought. Less code, and no magic numbers😊 I am learning python but coded professionally in other languages so it jumped out at me. Edit: I tried this out using lists and one while loop and it's 15 lines of code for unlimited questions and answers, it keeps score then figures percentage of correct using the score and list length. Neat. Thanks for your videos Tim I'm learning python pretty quick.
Thank you for making programming so awesome and interesting. I would do programming for the rest of my life because of tutorials like this. Keep it up bro, and hope one day we can work together!
Tim, thanks for teaching us plebs Python. I'm retired but I need to keep my mind active, don't do Sudoku but I find coding stimulating. One question what happens after one has created say a program using Python? I mean it has to go somewhere, it has to be used in someway. For example, say I've created a staff roster for a small business how do they use it? Just interested.
iam data engineering enthusiast and I wanted to start with python and one o my friend recommended your channel - I am glad I'm watching your videos to be a good python programmer - A big thank you from all of us who view your videos - YOUU ARE GOD SENT :)
Appreciate the tutorial! I would albo be so grateful if u could do one video like from "Advanced to Master" including Computer Vision, Object Detection and Machine Learning concepts, these things might be a bit confusing and explanation like this tutorial would be damn GOD LIKE useful
Love these tutorials. I am currently on the wpm typing test and am just thrown off by the curses module. I saw this tutorial as an opportunity to start diving into some python documentation to really get a good understanding of how to read and learn python libraries but the documentation of this library is so different than this tutorial. Like, if I stumbled across this library and tried to create this code on my own, what is being discussed seems far from what the documentation online shows for examples. Maybe I am just too new to this but it makes me wonder how I would stumble across libraries in the future and utilize them in this manner.
On the third rock-paper-scissors project there is a small flaw. Based on permutations and combinations the number of possibilities to occur is 9. We've considered 6 of them, the other 3 possibilities are draws, where both the computer and the user picks the same object. So here, the winning chances of the computer is quite high. Other than that so far it has been really helpful, thankyou soo much❤
Amazing video! Thank you! Can you please make a video and show us how to work with least amount of mouse use, so we can start working with right kind of habits on our way to become pro?! God Bless!
For the WPM Typing Test, I had to use key 127 for it to work on my mac. For others encountering this problem on their machines as well, here's how it looks like: if ord(key) == 127: if len(current_text) > 0: current_text.pop() else: current_text.append(key)
Hello Tim, Nice series of projects in Python. I've finished studying Python on my own with the book 'Python Crash Course 2nd Edition'. I've reached rock-paper-scissors now and I've changed a few things: I've added a variable ties, I've added an elif check if the computer_pick equals the user_input and then add 1 to ties, I also display the number of total games played and the number of tied games when the user quits the program. I'll be going to do all of these projects, so there may be another reaction in future. Good job, keep it up and all the best from Belgium --Philippe
i think your videos are great and easy to follow and understand. You might not like this but i am sure you have probably heard it before, but you remind me of Sheldon on "The big bang theory!. You look a lot like him and you both are very smart!. Keep up the good work. I am a beginner learning python and you have taught me a lot. Thanks for the videos.
Thank you very much for this video 🙏 and i like your teaching techniques that is learning through the project making real bro that type of skill not having in many peoples thank you very much 😊
Mega course for any intermediate....but i like the way you interact with your keyboard...I wonder your typing speed per minute...X wpm. Find X in wpm😂😂😂....Love your work team
FYI: In the Rock Paper Scissors game you were missing one piece of logic. You check if the user wins, and if not, you automatically make the computer win...but you forgot about ties! Now all the ties become wins for the computer. So one extra elif to check if the picks are the same would solve it.