No video

Mini Python Project Tutorial - Password Generator

  Рет қаралды 85,136

Tech With Tim

Tech With Tim

Күн бұрын

Пікірлер: 162
@worldanime9884
@worldanime9884 Жыл бұрын
please make more tutorials like this, because tutorials like this can make the logic of a programmer who is just learning python
@TechWithTim
@TechWithTim Жыл бұрын
thats the plan!
@dark_red_blood
@dark_red_blood Жыл бұрын
​@@TechWithTim 🎉❤
@vaclavhanzl8193
@vaclavhanzl8193 10 ай бұрын
@@TechWithTim How is the plan going?
@RyanShappa
@RyanShappa Жыл бұрын
Super awesome tutorial. I took a minute before I watched to think of ways I would do this if it was my own project. I was pleasantly surprised that we thought of the same ways to complete the project! Project Ideas: 1. url shortener 2. Inventory management system (library, grocery store, etc) with sql and simple front end (tkinter, react, etc.) 3. Minesweeper or Galaga with Pygame
@TechWithTim
@TechWithTim Жыл бұрын
Glad it was helpful!
@caioborgonha3900
@caioborgonha3900 Жыл бұрын
This example was supposed to be easy, however it got really interesting when you added the meet_criterian element the way you did it
@pepejas
@pepejas Жыл бұрын
Everything is so well explained. It's incredible. Thank you for your hard work and for releasing these tutorials for free
@mannatbhalla6415
@mannatbhalla6415 11 ай бұрын
This helped me with my assessment so much! I am just learning to code and you explained everything so clearly and perfectly!! Would love to keep seeing videos of yours! Thank you so much for this!
@edisongarcia94
@edisongarcia94 Жыл бұрын
Thanks for another great video. I like how your tutorials are fun, simple and informative.
@TimVandeSluisArtist
@TimVandeSluisArtist 9 ай бұрын
Great tutorial. It took me a little time to see the correlation between the user input changing the default state of has_number and has_special, and how that ultimately influenced what characters the program kept and discarded during the while loop. This tutorial has helped me understand how to break down the 'problem' into much smaller steps. Thanks.
@DANTESFAMILY
@DANTESFAMILY Ай бұрын
Hello, how does it work that the loop discard and keep characters. Mine is creating more than 10 chars until it complies with the condition
@adamsimmons6876
@adamsimmons6876 8 ай бұрын
I did it! this was my first tiny project! thank you i learned al ot!
@snehamalipatil149
@snehamalipatil149 8 ай бұрын
Hey I'm not getting the o/p
@purplelala2
@purplelala2 Жыл бұрын
Had to rewatch a couple parts to really understand the code. Glad I picked up ur explanations. Great tutorial!!!!!
@timchat9_my_teleqram_id
@timchat9_my_teleqram_id Жыл бұрын
Teleqram me 👆⬆️..
@Jo.o0o
@Jo.o0o 10 ай бұрын
Only been learning Python for 2 days now and this is the first project I fully understood :) slightly proud of myself
@SkyperX97
@SkyperX97 7 ай бұрын
You are a special breed if you are actually able to "fully undestend" this after just 2 days.
@Jo.o0o
@Jo.o0o 6 ай бұрын
@@SkyperX97 the progress has slowed down a lot now lol. Only felt like a savant for the first couple weeks
@marcelobc2230
@marcelobc2230 Жыл бұрын
if numbers: meets_criter (i) a = has_number Great job, thanks
@rioschala
@rioschala Ай бұрын
Just watched and spotted the same typo. Great video BTW.
@alimihakeem841
@alimihakeem841 Жыл бұрын
I really love to always watch your tutorial videos because your explanation is well detailed and understandable. As this would help me in building my programming skills in an efficient way
@timchat9_my_teleqram_id
@timchat9_my_teleqram_id Жыл бұрын
Teleqram me 👆⬆️..
@ExpensiveVitamins
@ExpensiveVitamins Жыл бұрын
I liked this tutorial, it was easy to follow (i just started learning python). I liked how you explained what you were doing and why. I'd definitely like to follow some other tutorials you create. I also liked how I didn't have to download any extensions to create something.
@poboy251
@poboy251 Жыл бұрын
Since I’m the first Tim I hope you see this. I found your videos because of my online CS degree class. Your projects help me build skill because I am struggling a bit with python. There’s so much I don’t understand. Loops are confusing. List and functions don’t make sense. I try to write code for my exercises but I end up going to stack overflow for the answers and it’s never anything I would have though to coding. I have your slot machine game saved to do the walkthrough as a side project and I’ll continue to save more to get some practice in. Thank you for these videos. Currently struggling to build a text based dragon game
@SpencerMckenithWilliams
@SpencerMckenithWilliams Жыл бұрын
Loops can be confusing concept. Are you taking any c#, c++, or any assembly low level languages you use for your CS classes?
@poboy251
@poboy251 Жыл бұрын
@@SpencerMckenithWilliams no i had one intro class that used coral then jumped right into a scripting class using python. I will say I am the most comfortable using python because before I started school I was already familiar with doing very simple things with it. I haven’t used another language yet. I’ve seen them on message boards and python seems to be the most direct and user friendly to me.
@SpencerMckenithWilliams
@SpencerMckenithWilliams Жыл бұрын
_annoying_data_list = [ i * 2 for i in range(9)] List comprehension is shorter syntax but this shouldn't seem confusing? I like doing things this way. Its just me.
@SpencerMckenithWilliams
@SpencerMckenithWilliams Жыл бұрын
@@poboy251 python is more user friendly. I went as far to understand how python memory management works to writing my heavier code with the python C-API. It is quite tedious but rewarding. Especially with subclassing and polymorphism. Still learning as I go along lol
@poboy251
@poboy251 Жыл бұрын
@@SpencerMckenithWilliams ok so walk with me on this. I know what you wrote but however I’m not getting it. Does that makes sense. It’s like I can identify your code because I’ve seen it before but as far as creating something like this myself I’m lost. Your “i” is the data you need to pull from the list multiplied by two specifically the 9th entry in the range I think?? Am I correct.
@BaDbOy-wj1ii
@BaDbOy-wj1ii Жыл бұрын
Very simpler form of this project: import random import string letters = string.ascii_letters numbers = string.digits special_char = string.punctuation character = letters if numbers: character += numbers if special_char: character += special_char password = "" len = int(input("Enter the length: ")) counter = 0 while counter < len: count_pass = random.choice(character) password += count_pass counter += 1 print("Your Password is:" , password) Leave a like so many people can see it.
@nehemydavis461
@nehemydavis461 8 ай бұрын
I'm sorry if i am wrong, but with that code, isn't there will be bug where there is a possibility for a password to be generated without symbol or number even though the user ask for it? So, if i want a password with number, there is a chance that i get a password full of letter because the while loop terminator is only the password length (as long as the minimum length condition fullfiled) which is not what i want.
@Aarnavop
@Aarnavop 2 ай бұрын
This Python project creates a password generator that allows users to set a minimum length and include numbers and/or special characters. Key moments: 00:15 This video will guide you through creating a beginner-friendly Python project - a password generator, allowing practice of Python skills and learning new concepts. Additionally, the video offers courses on Python and blockchain development for further learning opportunities. -The project involves creating a password manager with customizable features like setting a minimum length, including special characters, and numbers for dynamic password generation. -The video demonstrates importing modules, defining a function to generate passwords with specified criteria, and organizing characters for password generation. -The process of combining characters into a selection for random password generation is explained, ensuring the generated password meets the specified criteria. 05:17 The video explains how to generate a random password that meets specific criteria by including numbers, special characters, and reaching a minimum length through a loop in Python programming. -Explaining the process of adding numbers and special characters to the password string within the loop. -Setting up variables like 'PWT' for the password and 'meets criteria' to track if the password meets the specified criteria. -Detailing the logic behind updating the 'meets criteria' variable and the approach of starting with 'true' and potentially setting it to 'false' based on conditions. 10:24 The video explains a password generation function using conditional statements to ensure the password meets specific criteria like having numbers and special characters. It iterates to add characters until the criteria are met, then returns the generated password. -Explanation of the conditional statements used to determine if the password meets criteria like having numbers and special characters. It iterates to add characters until the conditions are satisfied. -Demonstration of running the password generation function with manual inputs for minimum length, numbers, and special characters. Showing how the function generates passwords meeting the specified criteria. 15:29 The video demonstrates creating a password generator in Python by taking user inputs for length, including numbers and special characters, then generating and displaying the password. It also addresses a variable naming error and encourages viewers to explore programming and Python further. -The process involves converting user inputs to lowercase, checking for specific criteria, generating a password based on the inputs, and displaying the result. -An error related to a variable naming issue is identified, explained, corrected, and the program is rerun to demonstrate the fix. -The video concludes by suggesting viewers explore programming and Python, offering resources for learning and inviting suggestions for Python projects in the comments. Generated by Aarnav Upadhyay
@sakosa8784
@sakosa8784 8 ай бұрын
This really taught me a lot about python
@abdulhk815
@abdulhk815 Жыл бұрын
Hi there, I believe from the function block line 26 change the value of the variable has value at line 18, this variable hold boolean value (T/F). Line 30 we update/change the value of meets criteria to True. Why we repeat to assign a boolean value "True" to a variable meets criteria at line 32 and 34.
@premsinghrathore9691
@premsinghrathore9691 Ай бұрын
Yeah, it looks like you just remove the meets_criteria var and it won't effect the code.
@jadotohovamnic206
@jadotohovamnic206 Жыл бұрын
thanks for the videos about python for beginners. They help me (total llamas) a lot.
@endtropi
@endtropi Жыл бұрын
Great approach for using boolean! Very useful tutorial ! Thank you and keep on this way!
@nguflavour1886
@nguflavour1886 Жыл бұрын
Please sir make more of this type of videos, this is really helpful thanks so much.
@murphygreen8484
@murphygreen8484 Жыл бұрын
This is fun, and for beginners, but seems far more complicated than necessary. Why continue trying to make combinations that have all your elements and checking them; when you can ensure it's all there to start with?
@M4nT1c0R3
@M4nT1c0R3 Жыл бұрын
line 32 also has meets_critera, the same typo. Great video tho
@NoobMaster-he8io
@NoobMaster-he8io Жыл бұрын
Line#32 is still incorrect. Contains typo for "meets_criteria" I believe because of that typo the code would generate passwords without numbers even if we include numbers in the password.
@timchat9_my_teleqram_id
@timchat9_my_teleqram_id Жыл бұрын
Teleqram me 👆⬆️..
@GiaQnn
@GiaQnn Жыл бұрын
nice project. but I have a problem with generating a password. all works correct I dont have any error but problem is when i answer on last input with has_special...
@seemelater5056
@seemelater5056 Жыл бұрын
the line 32 "meets_critera" is also should be set to "meets_criteria" right?
@premsinghrathore9691
@premsinghrathore9691 Ай бұрын
looks like it
@yoyonel1808
@yoyonel1808 Жыл бұрын
You don't have really a control on the length of the password generated, it can be (in worst case scenario) : max(len(letters) + len(digits), len(letters) + len(special)) i.e. you can't predict the length of your result password (generated), it's not a good "characteristic" for a security tool ... 🤔
@TechWithTim
@TechWithTim Жыл бұрын
I agree, but this is just for practice
@grandparick3176
@grandparick3176 Жыл бұрын
i wrote the same thing. How should one counter this?
@JohnWaithaka-gp6yo
@JohnWaithaka-gp6yo 3 ай бұрын
I am experiencing a logic error. The min_length, has_number or has_special functions are not running in my code. What can I do to solve this ?
@usamashami11
@usamashami11 Жыл бұрын
Thank you for the amazing tutorial! Loved it, since you used quite some tips which were new to me. Just wanna say, Line 32 has also the same variable name spelling mistake. Will it affect the working of code?
@yadavrupesh04
@yadavrupesh04 Жыл бұрын
Hey Tim, there is super extreme edge case where random.choice picks all the characters until the min length criteria is met and we end up with a password without numbers or special characters even though the flags may be True.
@TheDreamer94
@TheDreamer94 Жыл бұрын
hello tim thank you so much for you great way of expelling how to create a website(Python Website Full Tutorial - Flask, Authentication, Databases & More) but I want to add forget password and user in the website how to do so? again thank you for your get and hard work I really appreciate it
@TechWithTim
@TechWithTim Жыл бұрын
Unfortunately wirh flask u need to build that in yourself. However, Django does have it pre built if you want to check out it’s auth system, I have some tutorials!
@alexanderdestro5971
@alexanderdestro5971 Жыл бұрын
Thank you very much for the best tutorial like this its just a great job, useful, clear and interesting, keep it on!
@timchat9_my_teleqram_id
@timchat9_my_teleqram_id Жыл бұрын
Teleqram me 👆⬆️..
@MysteryMindset636
@MysteryMindset636 10 ай бұрын
yes bro make more vedios on projects that helps me as a begineer
@timbrown3683
@timbrown3683 Жыл бұрын
This is probably a silly question- why do the function inputs change between line 5 and line 43? are numbers and special characters set to true in line 5 just to allow them into the character generation portion of the function?
@jhonvicbardos1833
@jhonvicbardos1833 Жыл бұрын
There are no stupid questions man. We are all here to learn :D. I think the way the function arguments are setup was for manually calling it within the code. Basically, you can remove the default values so since the user is required to input arguments for special characters and numbers. I hope this helps and my explanation was bad. :)
@PA-bu5cs
@PA-bu5cs 9 ай бұрын
Great work - However I would prefere if you could slow down a little bit :) And maybe explain a little more thorough how each components relates to one another - its kinda trycka for a noooooob like me
@GamingGuy256636
@GamingGuy256636 2 ай бұрын
@Tech With Tim is it possible to turn this into a tool so I can distribute the tool, The reason for asking that is account Hijackers are back on the run I have had things happen to me and took me a while to change all passwords. but I think if people changed there passwords once or twice a month they would be more secure then before I have chosen when testing the code the tented minimum length I said 120, how ever when a password has been generated users could copy the code and save it somewhere so they dont forget the code.
@sauraabh
@sauraabh Жыл бұрын
Thank you for this!! After this series of mini projects is done, can you please also bring some new interesting django project tutorial?
@timchat9_my_teleqram_id
@timchat9_my_teleqram_id Жыл бұрын
Teleqram me 👆⬆️..
@mattlivingston2192
@mattlivingston2192 Жыл бұрын
I quite like this method of testing whether the generated password meets multiple criteria. I would however, change it ju-ust a little bit. Once the password meets the criteria, that's not going to change, is it? There's no need to check if it still meets the criteria after the next character. You have a relevant boolean value at hand (meets_criteria) - trust your previous tests and just use *THAT* to check whether you still need to check the password's validity. So, I'd change the variable name from "meets_criteria" to "criteria_met" and then put all the code from lines 25 - 34 behind an "if not criteria_met:" statement.
@timchat9_my_teleqram_id
@timchat9_my_teleqram_id Жыл бұрын
Teleqram me 👆⬆️..
@DANTESFAMILY
@DANTESFAMILY Ай бұрын
Hello it was a great tutorial I really engaged with the way it was explained however even though I copied exactly all in the same way I don't get it to work and I don't understand how does it work that the loop discard and keep characters. Mine is creating more than 10 chars until it complies with the condition can someone please help me understand?
@yourcristiano-official
@yourcristiano-official Жыл бұрын
Great Video!!
@natalicohen997
@natalicohen997 Жыл бұрын
If the random func will not generate number because there are less numbers then letters (if you choose pass len=3 for example) code will loop for ever? Or am I missing something?
@timchat9_my_teleqram_id
@timchat9_my_teleqram_id Жыл бұрын
Teleqram me 👆⬆️..
@pushon10
@pushon10 Жыл бұрын
How do you do error handling for when a user enters something other than a number for min length and print flags for each field?
@abdulhk815
@abdulhk815 Жыл бұрын
try: min_length = int(input("Enter the minimum length: ")) has_number = input("Do you want to have numbers (y/n)? ").lower() == "y" has_special = input("Do you want to have special characters (y/n)? ").lower() == "y" pwd = password_generator(min_length, has_number, has_special) print("The generated password is:", pwd) except: print("Wrong value")
@paulinapawlaczek7119
@paulinapawlaczek7119 Ай бұрын
Good tutorial but what if someone enters a letter instead of a number in min_len? and when n is allowed in has_number and has_special, the password is not generated from just letters
@deborahbopeya8150
@deborahbopeya8150 9 ай бұрын
Thank you so much ❤ you are a big help
@Roland-nx4jk
@Roland-nx4jk Жыл бұрын
Please I can't see the text in the tutorial well unlike the quiz game and others in the previous lessons
@viktorkovacs9680
@viktorkovacs9680 Жыл бұрын
Great video, although there is still a bug left in it.
@oakkarmin8833
@oakkarmin8833 6 ай бұрын
Hi. Please correct me if I'm wrong. On each iteration, only a character will be chosen from random.choice(characters), yes? Since we've set the default value of has_number and has_special to False, wouldn't meets_criteria will always be fault? I mean, for each loop a character generated from random.choice( ) cannot be both number and punctuation and in the loop, meets_criteria = meets_criteria and has_special. Before that line of code, meets_criteria = has_number was written, so if new_char not in digits then meets_criteria will be False, yes? So if new_char in special and has_special = True, since a number wasn't generated from random.choice( ), has_number will be False and meets_criteria = has_number will in turn affect meets_criteria = meets_criteria and has_special. I'm just really curious and wanted to know. I'm a beginner at Python with no prior programming experience. Your clarification would be very very much appreciated !!
@Stephen.c19
@Stephen.c19 Жыл бұрын
there should be another part where it says "do you want to save this password" and then when you type 'y' it saves it into a folder
@waipalisrevenge3707
@waipalisrevenge3707 Жыл бұрын
i agree , that's a very good idea of you , keep up the good work ::
@timchat9_my_teleqram_id
@timchat9_my_teleqram_id Жыл бұрын
Teleqram me 👆⬆️..
@bereck7735
@bereck7735 Жыл бұрын
Atleast this code is better than a lot of other password generator videos I have seen?, props to you for that, but why would you use random, its not a cryptographically safe random number generator, if you used secrets that would be better.
@TechWithTim
@TechWithTim Жыл бұрын
It’s just for a quick practice project!
@bereck7735
@bereck7735 Жыл бұрын
@@TechWithTim still it would be better if you secrets tbh, that would also promote the good way to create a password gen, still a good video nontheless
@mistious.8332
@mistious.8332 Жыл бұрын
hes using special characters not only numbers?
@bereck7735
@bereck7735 Жыл бұрын
@@mistious.8332 well yes, but that isnt the issue, the random module uses a psuedorandom number generator algorithm which is not cryptographically secure ( Mersenne's Twister ) and can be exploited
@nonetype66
@nonetype66 Жыл бұрын
@@bereck7735 this is a good point! But I think this video is for coding practice for beginners. Not cyber security professionals. I don’t think the average python beginner is thinking about or worried about how exploitable this password generator is while learning the syntax.
@TomasSchertel
@TomasSchertel Жыл бұрын
Which vscode extensions do you have there? I'd like to have keywords in italic too.
@mydolls6004
@mydolls6004 Жыл бұрын
I think it's the default one
@TomasSchertel
@TomasSchertel Жыл бұрын
@@mydolls6004 any thoughts on how to configure it?
@ToSSpec
@ToSSpec 11 ай бұрын
On the password print i get name "pwd" is not defined
@ToSSpec
@ToSSpec 11 ай бұрын
Found out how to fix it
@0xHydra
@0xHydra Жыл бұрын
Why do you need to set meets_criteria to True before validating with the conditional statements? Whether it starts as True or False, it'll be set to the right Boolean value after the conditional statements no?
@timchat9_my_teleqram_id
@timchat9_my_teleqram_id Жыл бұрын
Teleqram me 👆⬆️..
@snowin5797
@snowin5797 Жыл бұрын
Hi tim. I have a question . Can we have an AI that learn games and act as a personality test. Like when someone play a game , the AI understand his behavior in the videogame and give results of his personality. If yes , what should we learn in programming to do this ?
@philippedid
@philippedid 6 ай бұрын
hello Tim! can't we simplified those if/else with a dictionary ?
@TechWithTim
@TechWithTim 6 ай бұрын
Sure but his was just meant for beginners!
@zadduvaripallijagadeeshkum6843
@zadduvaripallijagadeeshkum6843 Жыл бұрын
in line 30, why cant we just write meets_criteria = has_number and has_special ?
@KayderimGameplays
@KayderimGameplays Жыл бұрын
Hey tim, are you using VScode? If so, what is the theme you are using?
@nbagaming1873
@nbagaming1873 Жыл бұрын
why you use meet_critera in the line 32 and the code still work? Because it does not match what you are explain.
@Hui1314
@Hui1314 Жыл бұрын
What if the criteria is to have a fixed length of password characters?
@colevano
@colevano Жыл бұрын
This is cool, but it is *not* secure. The normal Python random library is not designed for security or cryptography, so don't use this to make your real passwords.
@TechWithTim
@TechWithTim Жыл бұрын
For sure I didn’t say it was secure! Just for practice
@gnlchannel3497
@gnlchannel3497 Жыл бұрын
hello when i tried this everything worked out well but whenever i said yes to numbers but no to special characters it said that my password was none
@non5309
@non5309 Жыл бұрын
это наверное для начинающих совсем совсем начинающих, потому-что код явно излишний, плюс не хватает банальных проверок типа длина не может быть меньше 3 если все опции включены, ну и тому подобное.
@TechWithTim
@TechWithTim Жыл бұрын
It is designed for beginners, just a quick little example program
@binyameenpehlari7419
@binyameenpehlari7419 Жыл бұрын
interesting series
@lsaikumar4003
@lsaikumar4003 Жыл бұрын
Hi Tim,, Can you please check the line number 25 to 28., I think the second elif will not be executed. Correct me if I'm wrong. Thanks
@nehemydavis461
@nehemydavis461 8 ай бұрын
I think line 25-28 works just fine. It checks every new character whether it is a letter, digit, or special chars. If the new char is a digit then the first if will become true and has_numbers will be true thus we know that the password at least has a digit. If it not a digit, then the first if will be false, and second elif will be checked, and if it is indeed a special char then has_special will be true thus we know that the password already has at least 1 special char. if the new char is a letter, then we don't really care, because we just want to make sure the password meets the criteria and has minimum length of password. cmiiw 👍
@lsaikumar4003
@lsaikumar4003 7 ай бұрын
@@nehemydavis461 Thanks for clarifying
@TheDreamer94
@TheDreamer94 Жыл бұрын
Thanks!
@TechWithTim
@TechWithTim Жыл бұрын
Thank u!!
@cherryblossoms5970
@cherryblossoms5970 9 ай бұрын
17:56 in if number condition body that spelling is incorrect so how it didn't give you error ? But you fixed the special character body. Sorry its only one month passed I'm learning python with the help of youtube.
@avanichaudhary4806
@avanichaudhary4806 6 ай бұрын
can i add this in my resume?
@user-sk7yu8bx9b
@user-sk7yu8bx9b 11 ай бұрын
can you tell me how many members can do this project
@alexalexander1471
@alexalexander1471 11 ай бұрын
make a tutorial how to make a game of rock paper scissors and as short code as you can
@jiggabyte
@jiggabyte 4 ай бұрын
you still have another error on meet_critera
@yourcristiano-official
@yourcristiano-official Жыл бұрын
* Notifications On *
@teju4443
@teju4443 9 ай бұрын
In which software did you implement this code
@unitnuity
@unitnuity 8 ай бұрын
Visual Studio Code
@raJeshraOte14
@raJeshraOte14 Жыл бұрын
pls make oop videos on python flet or pynecone framework
@360worldvision4
@360worldvision4 7 ай бұрын
Do he is using VS CODE?
@MustafaDahbest
@MustafaDahbest Жыл бұрын
Hello everybody, how can we save this password .txt file? I searched google but can't resolve. I was able to try this: with open("Password", "w") as f: f.write("pwd")
@user-mi2bb8bm6s
@user-mi2bb8bm6s Жыл бұрын
meets_criteria = True if (needs_number and not has_number) or (needs_special and not has_special): meets_criteria = False
@timchat9_my_teleqram_id
@timchat9_my_teleqram_id Жыл бұрын
Teleqram me 👆⬆️..
@Harinissri
@Harinissri Жыл бұрын
Bro can I add this mini project in my resume????
@user-xu6pq5sx7z
@user-xu6pq5sx7z Жыл бұрын
Hi Tim, I've completed the code and when i put a minimum length of any number, the password generated is a 1 digit password. Do you know how to fix this?
@michaeldunn302
@michaeldunn302 Жыл бұрын
Same problem here, code is the same, any time I try to generate the pwd regardless of the min length entered it only kicks back a one digit response
@unitnuity
@unitnuity 8 ай бұрын
You guys probably fixed it but just incase, make sure you don't still have the generate_password(10) call that was replaced later in the video. Its always gonna limit to 10 or whatever you have for the parameter.
@LuizHenrique-xb3py
@LuizHenrique-xb3py 11 ай бұрын
I made a code to make the password even more random while len(pwd) < length: new_letter = random.choice(letters) new_number = random.choice(numbers) new_symbol = random.choice(symbols) choice = random.randint(0,3) if choice == 1 and has_letters: pwd += new_letter elif choice == 2: pwd += new_number elif choice == 3 and has_symbols: pwd += new_symbol return pwd it generates a random number and based on the number adds either a letter number or a symbol, based on if the user wants or not those in the code. hope it helps someone
@GamesindieSR
@GamesindieSR Жыл бұрын
Seems much longer code and many variables.
@pwomp9348
@pwomp9348 Жыл бұрын
nice
@cawkcheck
@cawkcheck Жыл бұрын
JESSE? WHAT ARE YOU DOING ON YT WE NEED TO COOK!!!
@jfmjaco5941
@jfmjaco5941 9 ай бұрын
You need a max numbe
@zaidtabish1996
@zaidtabish1996 Жыл бұрын
🥇
@mrxinnovations809
@mrxinnovations809 Жыл бұрын
Hello world
@renlog7755
@renlog7755 Жыл бұрын
import os print(os.urandom(7))
@TechWithTim
@TechWithTim Жыл бұрын
shhh, this is for practice
@usamashami11
@usamashami11 Жыл бұрын
@@TechWithTim 😂
@renlog7755
@renlog7755 Жыл бұрын
@@TechWithTim lolz
@viktorivailov8115
@viktorivailov8115 Жыл бұрын
1st
@Dabber7
@Dabber7 Жыл бұрын
Please speak slowly Bro
@SubDogWater
@SubDogWater Жыл бұрын
This project again didn't work for me. :(
@prashantdas3618
@prashantdas3618 Жыл бұрын
for a shorter version, tell me your email id
@SubDogWater
@SubDogWater Жыл бұрын
why do you need my email?
@grandparick3176
@grandparick3176 Жыл бұрын
@@SubDogWater he will try to scam you. don't give it.
@SubDogWater
@SubDogWater Жыл бұрын
@@grandparick3176 I know i just wanted to see what kind of an idiot he is
@prashantdas3618
@prashantdas3618 Жыл бұрын
@@SubDogWater : "Quote" for a shorter version... "Unquote". KZbin won't let me write programming code in the comment section
@grandparick3176
@grandparick3176 Жыл бұрын
There is one problem, that is the password length is higher than the one user has chosen sometimes.
@timchat9_my_teleqram_id
@timchat9_my_teleqram_id Жыл бұрын
Teleqram me 👆⬆️..
@meryouti293
@meryouti293 3 ай бұрын
import random import string def generate_password(length= 26): # Define the character sets to use in the password letters = string.ascii_letters # 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' digits = string.digits # '0123456789' symbols = string.punctuation # '!@#$%^&*()_+[]{}|;:,.?' # Combine all the character sets all_characters = letters + digits + symbols # Ensure the password has at least one letter, one digit, and one symbol password = [ random.choice(letters), random.choice(digits), random.choice(symbols) ] # Fill the rest of the password length with random characters from all_characters password += random.choices(all_characters, k=length - 3) # Shuffle the characters to ensure the random order random.shuffle(password) # Convert the list to a string and return it return ''.join(password) # Generate a random password with the default length of 12 print("Generated password:", generate_password())
@nehemydavis461
@nehemydavis461 8 ай бұрын
you actually still has the "meets_critera" typo without 'i' in line 32. Because of that even if you don't want numbers, it still shows up just like your last test after fixing the same other typo. That makes me wondering, if in cpp or something that needs to initialize a variable with the data types first, then that typo will become an error which will notice me, but with python that typo is not an error, but a bug that could go unnoticed, how do i prevent this unnoticing typo that become bug in python? Thanks! great tutorial 👍
Learn Python With This ONE Project!
55:04
Tech With Tim
Рет қаралды 1,7 МЛН
Mini Python Project Tutorial - Alarm Clock
13:24
Tech With Tim
Рет қаралды 71 М.
7 Days Stranded In A Cave
17:59
MrBeast
Рет қаралды 94 МЛН
❌Разве такое возможно? #story
01:00
Кэри Найс
Рет қаралды 3,6 МЛН
How To Practice Programming So You Actually Get Good
15:46
Tech With Tim
Рет қаралды 132 М.
If __name__ == "__main__" for Python Developers
8:47
Python Simplified
Рет қаралды 398 М.
Website Bruteforcer using Python Requests [Ethical Hacking]
15:19
Just Another Coder
Рет қаралды 73 М.
Build Anything With ChatGPT, Here’s How
1:24:05
David Ondrej
Рет қаралды 1 МЛН
I run untested, viewer-submitted code on my 500-LED christmas tree.
45:17
The Truth About Learning Python in 2024
13:05
Tech With Tim
Рет қаралды 62 М.
The Ultimate 25 Minute Python Project!
28:59
Tech With Tim
Рет қаралды 71 М.
3 PYTHON AUTOMATION PROJECTS FOR BEGINNERS
17:00
Internet Made Coder
Рет қаралды 1,6 МЛН
5 IMPRESSIVE Python Resume Projects (You Can Finish in A Weekend)
12:20
Internet Made Coder
Рет қаралды 247 М.
5 Amazing Ways to Automate Your Life using Python
18:40
Internet Made Coder
Рет қаралды 243 М.
7 Days Stranded In A Cave
17:59
MrBeast
Рет қаралды 94 МЛН