The Ultimate 25 Minute Python Project!

  Рет қаралды 68,157

Tech With Tim

Tech With Tim

Күн бұрын

Today, I'll be showing you a quick Python project that you can work on to hone and practice your skills, while learning some new Python features!
💻 Start scanning your code with CodeSec by Contrast Security for free! bit.ly/3VLR0P0
💻 Master Blockchain and Web 3.0 development today by using BlockchainExpert: algoexpert.io/blockchain - use code "tim" for a discount!
💻 ProgrammingExpert is the best platform to learn how to code and become a software engineer as fast as possible! programmingexpert.io/tim - use code "tim" for a discount!
⭐️ Timestamps ⭐️
00:00 | The Ultimate Python Project
01:00 | Project Demo
04:20 | Project Walkthrough
27:28 | Running the Project!
◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️
👕 Merchandise: teespring.com/stores/tech-wit...
📸 Instagram: / tech_with_tim
📱 Twitter: / techwithtimm
⭐ Discord: / discord
📝 LinkedIn: / tim-ruscica-82631b179
🌎 Website: techwithtim.net
📂 GitHub: github.com/techwithtim
🔊 Podcast: anchor.fm/tech-with-tim
🎬 My KZfaq Gear: www.techwithtim.net/gear/
💵 One-Time Donations: www.paypal.com/donate?hosted_...
💰 Patreon: / techwithtim
◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️
⭐️ Tags ⭐️
- Tech With Tim
- Python Development
- Coding
⭐️ Hashtags ⭐️
#techwithtim #developer #python #howtolearncoding

Пікірлер: 107
@benjohnston3369
@benjohnston3369 Жыл бұрын
As a beginner, some of this goes over my head, but the language is slowly starting to make sense thanks to your videos! Thanks for making them.
@TechWithTim
@TechWithTim Жыл бұрын
Happy to help!
@user-wz3zi3fv9y
@user-wz3zi3fv9y Жыл бұрын
Life is crazy, i first started watching your python tutorials when i was 15 back when you didn’t even show your face, fast forward 5 years later i got into CS because of you.. now being in my third year of uni and i still come back to your channel for help. You don’t know me but I have a lot to thank you for😭
@joannatrafna164
@joannatrafna164 Жыл бұрын
hey Tim, I am a data analyst struggling with Python but your videos helped me so much to understand how Python works! Thank you so much for sharing! You are a brill teacher!
@AliAliOxenFree
@AliAliOxenFree Жыл бұрын
man you did a fantastic job in this video describing a situation that is difficult to describe (but is not exceedingly complicated, logic wise). You're a talented teacher!
@seyu8666
@seyu8666 Жыл бұрын
Thank you so much for this. As someone who knows python but never really kind of mastered it this is really helpful in regaining the confidence in my learnings. Please make more of such projects
@adityabhambhani207
@adityabhambhani207 Жыл бұрын
you're a legend Tim! what a fun experience i had while doing this...there really is an elegance about programming and oh boy do i love it!
@ahmedalsaedi3849
@ahmedalsaedi3849 Жыл бұрын
This project is rich with logic and algo that are used to solve interview questions. Highly recommend watching more then once.
@vedantsgoodlife7302
@vedantsgoodlife7302 Жыл бұрын
This is a good way to learn. Please keep posting such videos.
@alimihakeem841
@alimihakeem841 Жыл бұрын
Thanks so much Tim for all the beneficial videos. Have really learn alot from it.
@mathewhunter7826
@mathewhunter7826 Жыл бұрын
Hi Tim. Another solid video and project. I liked it so much and also tried a different way to write the program. I used a binary np array to code the color/position of a guess/target. Then used some mathematical functions to calculate correct/incorrect values. One of the things I really like about coding is the idea that there are many ways to write/solve a problem. With your videos I am learning to write to the point that I can explore different ways. Although, they are not very clean. With time they will be. Thanks for another great video! Looking forward to more!
@Abdulla_tech
@Abdulla_tech Жыл бұрын
Since building the space invaders game with you 3 months ago and understanding nothing, I now understanding 90% of whats going on here and feel so proud. Thanks Tim!
@bzwiv8021
@bzwiv8021 Жыл бұрын
Thanks Tim, this content is always useful.
@ehsanulhaqueraiyan8681
@ehsanulhaqueraiyan8681 10 ай бұрын
I’m liking this type short project video because it is more enjoyable to learn programming with projects. hope u will bring more
@hussnainkhan900
@hussnainkhan900 Жыл бұрын
I really enjoy your projects. You are such a blessing for Beginners. I really enjoy your vides so much. I just want to say : THANK YOU SO MUCH FOR SUCH A GREAT CONTENT.
@ayatr26
@ayatr26 10 ай бұрын
Thanks, you helped me break down this problem for my students. Really appreciate it!
@bombus1340
@bombus1340 Жыл бұрын
I replicated the code exactly (exept for using letters A-F instead of colours) and ran into a bug. After checking the correct positions, the second for-loop doesn't know which letters of the guessed code have already been used to find correct positions. Therefore the second loop goes over all letters in the guessed code again and compares them to the remaining actual code letters in the counts dict. If one of the remaining letters is identical to one of the guessed letters in the correct position, it uses that letter again for the incorrect position. Here is an example, because I think my description sucks: If the correct code is ECCD and you guess ECFD, the game prints 3 correct guesses and 1 incorrect guess (which doesn't make any sense). A workaround is to add "if guess_color != real_code" into the if-condition of the second for-loop. I hope this makes some sense lol
@murphygreen8484
@murphygreen8484 Жыл бұрын
I love these videos, and this is very beginner friendly, but so much of this seems to be done much more difficultly than it needed to be
@murphygreen8484
@murphygreen8484 Жыл бұрын
I can share my equally beginner code if interested?
@jimrobinson1963
@jimrobinson1963 Жыл бұрын
Great set of videos, thanks Tim.
@hassanarjmandnia
@hassanarjmandnia 9 ай бұрын
that was a very very good video, thank u for making all of this awesome video. i hope u make more and more of this python projects video ( especially for intermediate level ) because they are very helpful. tnx again tim.
@mangeurdecowan
@mangeurdecowan Жыл бұрын
I never knew "else" could be used with a "for" loop. Nice!!
@paulthomas1052
@paulthomas1052 Жыл бұрын
Great project - Thanks.
@rayne6871
@rayne6871 Жыл бұрын
Hey Tim, loved the video! Is there any way to add the curses module into this? I've been stuck on it for quite some time
@mariumbegum7325
@mariumbegum7325 Жыл бұрын
Very useful content, great work!
@RedFox-ew8ek
@RedFox-ew8ek Жыл бұрын
Hey Tim, your tutorials is very wonderful, comprehensive and realistic to a beginner like me, thank you for sharing your knowledge to us.. god bless..
@TechWithTim
@TechWithTim Жыл бұрын
No problem! Glad you liked it
@harishsanthosh3861
@harishsanthosh3861 Жыл бұрын
You are amazing my python skills are grow with yoy thank you bro❤
@ithinkthereforeitalk935
@ithinkthereforeitalk935 Жыл бұрын
Totally digging your new look. Brutal-looking bro with a beard. Yep, you gotta grow a pair, gotta toughen up , gotta hold your ground against ubiquitous Chat Gpt :).
@TechWithTim
@TechWithTim Жыл бұрын
lmao, exactly why i grew it out ;)
@adventuresofavalon2477
@adventuresofavalon2477 Жыл бұрын
Love such projects like this! Keep them coming
@TechWithTim
@TechWithTim Жыл бұрын
That’s the plan!
@dylanyork5407
@dylanyork5407 Жыл бұрын
I've learned what I know about python from you, so thank you for that. Is it possible you could do a tutorial for an rpg style text based adventure game in python?
@DVDY-ih8wi
@DVDY-ih8wi 8 ай бұрын
cool example, well explained!
@elahekhatoonabadi7402
@elahekhatoonabadi7402 Жыл бұрын
It’s awesome .thank you
@dyndarkxy8294
@dyndarkxy8294 Жыл бұрын
thank u very much this helped :)
@MarElNij
@MarElNij Жыл бұрын
Can you make a video about how to 'upgrade' this program? Mabye by making a function to show which color is correct, incorrect or not used. Like the real game....
@sanumpzha
@sanumpzha Жыл бұрын
Nice video.👍
@alexcmad1000
@alexcmad1000 Жыл бұрын
I love you Tim from Tech with Tim
@felanfelani9117
@felanfelani9117 Жыл бұрын
Hi, I think it wasn't required to use zip at line 49. Instead, it could have been done with a simple for loop.
@landonhutchinson2697
@landonhutchinson2697 5 ай бұрын
I would like to add levels to this and each time the length increases. What would be the best way to do that? Make modules?
@fichtensaft5149
@fichtensaft5149 Жыл бұрын
You’re starting to look like Walter White Keep it up, it’s amazing Now let’s watch the video
@TechWithTim
@TechWithTim Жыл бұрын
Lmao
@odex_cod1030
@odex_cod1030 Жыл бұрын
Bro's the one who knocks
@ramganeshwaranm2535
@ramganeshwaranm2535 Жыл бұрын
very useful
@andrewtsegaye7330
@andrewtsegaye7330 Жыл бұрын
Is there anyone that competes with you with python? For me, you're the only one on this planet!
@ChupoCro
@ChupoCro Жыл бұрын
Are you by "competes" referring to "the ability to explain Python in an understandable and comprehensive way" or to "the ability to write very complicated Pyhon code not everyone could write"?
@andrewtsegaye7330
@andrewtsegaye7330 Жыл бұрын
@@ChupoCro Tim is python master! I'm sure that he come back with mind-blowing AI apps like chat-GPT
@ChupoCro
@ChupoCro Жыл бұрын
​@@andrewtsegaye7330 ​ I didn't say he isn't. But how could such a claim be based on watching the tutorials targeting beginners? For example, how could you tell Einstein is a top scientist afer watching him giving lectures to elementary school students? The other thing I implied is wether you examined some *really* complicated program code. You may take a look at Laplace Transform routines, understanding FFT algorithm, removing echo from sound routines, combining of accelerometer and gyroscope readings in PID loops used in quadcopters (take a look at Betaflight firmware) and similar. Of course, I am talking about programming all these from scratch and optimising the code for special purposes, not simply using some libraries. Or you may take a look at *capture the flag* problems involving Python.
@andrewtsegaye7330
@andrewtsegaye7330 Жыл бұрын
@@ChupoCro I have worked with him for years nowadays.
@manjultripathi8309
@manjultripathi8309 Жыл бұрын
Thanks
@FURY_7_7
@FURY_7_7 Жыл бұрын
Tim what is the name of your vscode theme in this video ?
@OnixEdge
@OnixEdge 11 ай бұрын
I couldn't find the code for this in your github. I'm struggling with functionality and would like to see the source code to compare.
@andreazevedodesign
@andreazevedodesign Жыл бұрын
Hello. Could you make an extension for inkscape, a simple one just for learning?
@Milkamoki
@Milkamoki 11 ай бұрын
Great tutorial!!! I'm just wondering if there is a way to split the users guesses with the space separator AND if there isn't any space, split by spelling. I've found something like ◽guess = [*guess] ◽but I can't find a way how to make it work with .split(" ")
@leulwebshet9750
@leulwebshet9750 Жыл бұрын
I saw this notification while watching your Greedy Algorithms Tutorial😊
@TheM9s
@TheM9s Жыл бұрын
So if you enter any incorrect format answer , EG OOOO, or O O OO, it infinitely loops, how can this be solved?
@kinghumbles6173
@kinghumbles6173 Жыл бұрын
Have you made series of python from zero to hero?
@user-xw5lh6rv7e
@user-xw5lh6rv7e 7 ай бұрын
I hope this message finds you well. I wanted to take a moment to express my deep gratitude for your invaluable contribution to the project. Your efforts have been instrumental in its success, and I am truly grateful for your dedication and hard work. I wanted to let you know that the project has been completed, and it wouldn't have been possible without your expertise and support. Your guidance and input throughout the process have been invaluable, and I am truly grateful for your contributions.
@yessirski7868
@yessirski7868 11 ай бұрын
I have been having some trouble with this for some reason. When I try to run it, it tells me the last line where the if __name__ == __main__ line is has an error because game( ) is not defined. any idea on how to fix this issue?
@natsukeru
@natsukeru Жыл бұрын
In the generate_code function, I would just write code.append(random.choice(COLORS)) instead of setting the random.choice to a variable then append the variable to code Is there a reason to do it in two lines instead of one? Is it a convention or just to make it easier to explain/change later?
@Hex-Scholar
@Hex-Scholar Жыл бұрын
I used random.choices!
@Miggy97
@Miggy97 Жыл бұрын
No difference at all, just helps with readability
@mahmudunnabisiam
@mahmudunnabisiam Жыл бұрын
Love you video following from a long time
@user-pi6hl7qb4d
@user-pi6hl7qb4d 4 ай бұрын
Bro is responsible for me failing college but getting a job as a Py Dev lol
@nothanksjac
@nothanksjac 10 ай бұрын
did everything as shown but correct position wont show in return. Help?
@fondbcn42
@fondbcn42 Жыл бұрын
why the last 'else' didn't raise an error ?
@marcinzale
@marcinzale Жыл бұрын
Very good explanation
@naturesmusic1171
@naturesmusic1171 Жыл бұрын
Got a bit confused coz I kept hearing "cutters" .. figured you were saying colors
@TechWithTim
@TechWithTim Жыл бұрын
I blame my Canadian accent
@htune754
@htune754 Жыл бұрын
im lost...how do you actually run the code. i debugged it. nothing wrong , but it wont actually run. do i need an extension?
@Goose____
@Goose____ Жыл бұрын
you do need a python extention in vscode yes
@erfanali3441
@erfanali3441 Жыл бұрын
hey guys, someone can help me? i wrote this game with Tim step by step but mine is not running properly it just ask me to enter colors and then says that you must enter 4 color. and it continues like this. can you please help me? i checked my codes and it was exactly like him.
@infinitespace1982
@infinitespace1982 Жыл бұрын
This is like wordle
@minhamhussain2000
@minhamhussain2000 Жыл бұрын
good sir
@relytheone853
@relytheone853 6 ай бұрын
I wish I have more knowledge to build the next big thing.
@sadjiajfiarei3498
@sadjiajfiarei3498 Жыл бұрын
can anyone give me a piece of advice. My code always works i tried to made this programm myself and i successfully made it but the problem is that my programm is shitty not professional at all
@learningonline3648
@learningonline3648 Жыл бұрын
You can simply extend this to make Wordle!
@Mr.Nichols
@Mr.Nichols Жыл бұрын
Fun innovative way to torture your prisoners as a Dev in Python! "Let me go, please!" "Yeah, sure let me just program this game real quick... and......... let's play." If they don't get the answer within 10 times..... they 🤐🤐
@EmirKayaloglu
@EmirKayaloglu 9 ай бұрын
NİCE MAN
@odex_cod1030
@odex_cod1030 Жыл бұрын
Bro have been watching u b4 u had a breard
@Harshadswe123
@Harshadswe123 Жыл бұрын
Make project videos with golang
@princesimfukwe9158
@princesimfukwe9158 Жыл бұрын
Tim with beards kkkk
@Simple_OG
@Simple_OG Жыл бұрын
What is the name of your vs code theme
@sheepsushis5720
@sheepsushis5720 Жыл бұрын
monokai
@ShrijaVadla
@ShrijaVadla Ай бұрын
44 line, it says NoneType error
@ItzAngeI
@ItzAngeI Жыл бұрын
the master of python creating the mastermind game
@pmcelraft
@pmcelraft 9 ай бұрын
Wait a minute this is false advertisement as the thumbnail has a graphical program
@faresmahmoud1305
@faresmahmoud1305 Жыл бұрын
Hey man, loved the video keep up the good work. but I disliked the transitions for me it was too long.
@claudiamanta1943
@claudiamanta1943 3 ай бұрын
Is this how a hacker creates a simple program to guess a password?
@maigijs
@maigijs Жыл бұрын
Little bit tweaks and it will become a word guessing game!
@dhruvmandala5128
@dhruvmandala5128 10 ай бұрын
for me on line 44 it says guess is undefined
@ShrijaVadla
@ShrijaVadla Ай бұрын
Same, did you solve that??
@manojitbiswas555
@manojitbiswas555 10 ай бұрын
source code?
@mcpro7334
@mcpro7334 Жыл бұрын
Hey
@ChupoCro
@ChupoCro Жыл бұрын
Should be {TRIES} *tries* instead of just {TRIES}. 50+ comments and noone noticed?
@Hex-Scholar
@Hex-Scholar Жыл бұрын
Hey Tim, Nice Project, a good warmup! For Generating the Code, we could: code = random.choices(COLORS, k= CODE_LENGTH) right ?
@buzzard777
@buzzard777 9 ай бұрын
Nice video. Not important but for some reason I keep hearing you say "cuthers" instead of colors.
@Ursus_major37
@Ursus_major37 Жыл бұрын
Pierwszy!
@mddawid0323
@mddawid0323 Жыл бұрын
no one prefers python IDLE
@SubDogWater
@SubDogWater Жыл бұрын
None of your projects ever worked for me.
@TechWithTim
@TechWithTim Жыл бұрын
What are u having issues with?
@baloney_sandwich
@baloney_sandwich 11 ай бұрын
Hold a second, this doesn’t even have a GUI, useless, good effort though
@kvelez
@kvelez Ай бұрын
import random COLORS = ['R', 'G', 'B', 'Y', 'W', 'O'] ATTEMPTS = 10 LENGTH = 4 def generate_code(): code = [] for _ in range(LENGTH): code.append(random.choice(COLORS)) return code def guess_code(): while True: guess = input('Enter your guess (e.g., R G B Y): ').upper().split() if len(guess) != LENGTH: print(f'Invalid guess. Please enter a {LENGTH}-color code.') continue for color in guess: if color not in COLORS: print(f'Invalid guess. Please use colors from {COLORS}.') break else: return guess def evaluate_guess(guess, code): color_counter = {} valid_position = 0 invalid_position = 0 for color in code: if color not in color_counter: color_counter[color] = 0 color_counter[color] += 1 # First pass: Count valid positions and decrease the counter for guess_color, real_color in zip(guess, code): if guess_color == real_color: valid_position += 1 color_counter[real_color] -= 1 # Second pass: Count invalid positions without counting already matched colors for guess_color, real_color in zip(guess, code): if guess_color != real_color and guess_color in color_counter and color_counter[guess_color] > 0: invalid_position += 1 color_counter[guess_color] -= 1 return valid_position, invalid_position def game(): print(f"You have {ATTEMPTS} attempts to guess the {LENGTH}-color code.") print('The available colors are: ', ' '.join(COLORS)) code = generate_code() for attempts in range(1, ATTEMPTS + 1): guess = guess_code() valid_position, invalid_position = evaluate_guess(guess, code) print(f'Valid position: {valid_position}. Invalid position: {invalid_position}.') if valid_position == LENGTH: print(f'You guessed the color code in {attempts} attempts!') return else: print('You ran out of attempts. The code was:', ' '.join(code)) if __name__ == '__main__': game()
@OriginalCoder.__
@OriginalCoder.__ 3 ай бұрын
Hi everyone import random COLOR=['R','G','B','Y','O','W'] tries=10 code_length=4 def generate_code(): code=[] for _ in range(code_length): Color=random.choice(COLOR) code.append(Color) return code code=generate_code() print(code) for i in range(tries): correct_position=0 incorrect_position=0 user_code=input("Guess The code : ").upper() for j in range(len(user_code)): if user_code[j] not in code: pass # print("Correct Position ", correct_position,"|","Incorrect Position : ",incorrect_position) elif user_code[j] in code: # print("Yes") if user_code[j]==code[j]: correct_position+=1 # incorrect_position=0 else: incorrect_position+=1 print("Correct Position ", correct_position,"|","Incorrect Position : ",incorrect_position) if correct_position==4: print("You guessed right!! in {} tries".format(i)) break else : continue Can anybody please tell is this approach of my code correct or not?
3 Python Projects I’d Put On MY Resume
14:49
Tech With Tim
Рет қаралды 51 М.
5 Mini Python Projects - For Beginners
1:41:08
Tech With Tim
Рет қаралды 2,8 МЛН
버블티로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 89 МЛН
Khóa ly biệt
01:00
Đào Nguyễn Ánh - Hữu Hưng
Рет қаралды 20 МЛН
Mastering Python - Everything You Need To Know To Become a Python Master
16:02
Erdős-Woods Numbers - Numberphile
14:12
Numberphile
Рет қаралды 67 М.
Convert .py to .exe in 37 seconds!
0:37
Practical Coding
Рет қаралды 40 М.
The Problem with Wind Energy
16:47
Real Engineering
Рет қаралды 795 М.
5 Tips To Organize Python Code
12:16
Tech With Tim
Рет қаралды 218 М.
Learning by doing :: C++ -- Function Templates in C++
15:11
Einsteinzee
Рет қаралды 124
Nested loops in Python are easy ➿
5:35
Bro Code
Рет қаралды 265 М.
Create A Python API in 12 Minutes
12:05
Tech With Tim
Рет қаралды 572 М.
How to Get Ahead of 99% of Programmers (in 99 seconds)
2:31
Sahil & Sarra
Рет қаралды 183 М.
Mini Python Project Tutorial - Password Generator
18:27
Tech With Tim
Рет қаралды 79 М.
버블티로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 89 МЛН