Python Project 2 | Password Generator in Python | Python for Beginners

Поделиться
HTML-код
  • Опубликовано: 22 апр 2023
  • In this lecture We will learn how to create a Random Password Generator using Python. In this Random Password Generator, the user will be required to enter How many letters, symbols and numbers user want in his password after which he'll be provided with a random password. Here, we'll be using the 'random' module in Python to create our project
    Best Python Tutorials for Beginners: • Python - Basic to Advance
    *********************************************
    Connect & Contact Me:
    My Second Channel Link: bit.ly/354n7C7
    Facebook: / jennys-lectures-csit-n...
    Quora: www.quora.com/profile/Jayanti...
    Instagram: / jayantikhatrilamba
    Twitter: / khatrijenny
    *******************************************
    More Playlists:
    Programming in C Tutorials: • Programming in C
    C++ Tutorials for beginners: • Lec 1: How to Install ...
    Placement Series: • Placements Series
    Data Structures and Algorithms: https: • Data Structures and Al...
    Design and Analysis of Algorithms(DAA): • Design and Analysis of...
    Dynamic Programming: • Dynamic Programming
    Operating Systems tutorials: // • Operating Systems
    DBMS Tutorials: • DBMS (Database Managem...
    #coding #pythonforbeginners #python #jennyslectures #pythonprogramming #projects

Комментарии • 82

  • @sugan7882
    @sugan7882 Год назад +1

    Thank u mam for ur wonderful presentation.

  • @swarnimdubey9745
    @swarnimdubey9745 Год назад +6

    Mam I've made GUI base one but that doesn't ask for such conditions 😂
    I loved this one and can't wait to try this soon❤❤

  • @informationchannel7538
    @informationchannel7538 Год назад +1

    Thank You Excellent Mam

  • @seenumadhavan4451
    @seenumadhavan4451 Год назад +22

    import random
    import string
    password=''
    print('welcome to password generator')
    words=[random.choice(string.ascii_letters) for i in range(int(input('enter how many letters')))]
    numbers=[random.choice(string.digits) for i in range(int(input('enter how many numbers')))]
    symbol=[random.choice(string.punctuation) for i in range(int(input('enter how many symbols')))]
    key=words+numbers+symbol
    random.shuffle(key)
    for i in key:
    password=password+i
    print(password)

  • @ravadarajasehkar5497
    @ravadarajasehkar5497 Год назад +2

    Mam,Thankyou very much for coming back 🎉🎉🎉

  • @pravinsingh3453
    @pravinsingh3453 11 месяцев назад

    Tnx Jenny mam interesting project you teach 😘👏👏

  • @kusmareddy1139
    @kusmareddy1139 4 месяца назад

    Mam thanks for your class then I will your video and I will learn the python course

  • @rongalamanindra5279
    @rongalamanindra5279 Год назад +1

    Thank you so much mam please continue python mam

  • @ankitpathak9334
    @ankitpathak9334 Месяц назад

    Appreciated 💯💯

  • @soorya_kv0304
    @soorya_kv0304 Год назад +4

    Mam, please continue c++ series mam.. We are waiting

  • @itsme-sm9jp
    @itsme-sm9jp 4 месяца назад

    Thank you mam and we love you❤ you are very useful to us

  • @shrikantdesai6973
    @shrikantdesai6973 4 месяца назад

    thanks for this project

  • @bharathgamingyt8470
    @bharathgamingyt8470 Год назад +1

    Cuteness overloaded💓

  • @mwangikagwi5349
    @mwangikagwi5349 3 месяца назад

    I used random.choices and set K= user input to generate random characters from letters, numbers and symbols in the easy part.
    In the hard part, I updated the lists into a set and printed the set since I knew that it would shuffle its contents randomly.

  • @manfredmasiko4444
    @manfredmasiko4444 Год назад

    I hadMissed your lecture that bad😀

  • @nireesha5494
    @nireesha5494 Год назад

    Tq so much mam

  • @paavaneep6645
    @paavaneep6645 Год назад +3

    Mam please respond mam 🙏🙏🙏🙏🙏🙏🙏🙏😭😭😭😭😭 when will you continue C++ series mam.. completed C and eagerly waiting for C++ please continue mam upload full course 🥺🥺🙏🙏🥺🙏🙏🥺🙏

  • @karimwazahat
    @karimwazahat Месяц назад

    we can give directly in range function the value as n-letters , n_symbols without starting from 1 it will directly run the loop for the same number of letters or symbols that user will give

  • @akshitajain5517
    @akshitajain5517 Год назад +4

    Di please continue your dbms series..

  • @scientificalquran3642
    @scientificalquran3642 Месяц назад

    i love your think sister.

  • @RitwikSharma-wq5vu
    @RitwikSharma-wq5vu Год назад +2

    import random
    import string
    print ('Welcome to password generator')
    n = int(input('How many numbers do you want ? '))
    l = int(input("How many letters do you want ? "))
    c = int(input("How many capital letters do you want ? "))
    s = int(input('How many symbols do you want to have in your password ? '))
    letters = random.choices(string.ascii_lowercase, k = l)
    cap = random.choices(string.ascii_uppercase, k = c)
    r = random.choices(range(0, 10), k = n)
    sym = random.choices(string.punctuation, k = s)
    p = (letters + r + sym + cap)
    random.shuffle(p)
    for item in p:
    print (item, end = '')

  • @pandipatipavan3804
    @pandipatipavan3804 Год назад +2

    Please provide the code files and the links in the description as soon as possible for free 🙏 thank you so much.

  • @yasothakarthikeyan9604
    @yasothakarthikeyan9604 Год назад

    Old Jenny is back

  • @ashdeepkashyap8717
    @ashdeepkashyap8717 Год назад

    Mam please complete c++ series🙏🙏🙏🙏

  • @user-iw2st1fj9i
    @user-iw2st1fj9i 8 месяцев назад

    mam can we do random.choice thing before the for loop?

  • @praneethamalakapalli3137
    @praneethamalakapalli3137 Год назад +1

    Sister pls I want more projects on python plsplsssss

  • @aarthiboopalan2814
    @aarthiboopalan2814 5 месяцев назад

    Maam put video of sales insight of fmgc python project

  • @Namikazeminato071
    @Namikazeminato071 Год назад

    Mam I'm come from Instagram 😮

  • @ABHISHEK__BHATI
    @ABHISHEK__BHATI Год назад

    Mam whatever you teach , do you have pdf of this notes . So we can easily read them and watch you, without making self notes

  • @muneebbolo
    @muneebbolo 5 месяцев назад +1

    Easy steps for layman to understand the Program Coding:
    It first imports the random module, which is used to generate random numbers or select items at random.
    It then defines lists of lowercase and uppercase letters, numbers, and special symbols.
    The program prompts the user to enter the number of letters, symbols, and numbers they want in their password.
    It then generates a list of characters for the password. It does this by randomly selecting the specified number of letters, symbols, and numbers from the respective lists and adding them to the password_list.
    The random.shuffle function is used to shuffle the characters in the password_list to ensure the password is random and not predictable (i.e., it doesn’t just have all the letters first, then the symbols, then the numbers).
    Finally, it joins all the characters in the password_list into a single string and prints the generated password.
    So, if you run this program and follow the prompts, it will generate a random password for you based on your specifications. This can be useful for creating secure passwords. Please remember to always keep your passwords safe and secure! 🔒

  • @raghavsanoria528
    @raghavsanoria528 10 месяцев назад +2

    import random
    print("Welcome to the Password Generator!")
    letters=int(input("How many letters you want in your password?
    "))
    symbols=int(input("How many symbols you want in your password?
    "))
    numbers=int(input("How many numbers you want in your password?
    "))
    if((letters

  • @questionmark70075
    @questionmark70075 Год назад +2

    Di, I am clear 12th class this year. (I am waiting result).
    I want to study AI and machine Learning.
    What, I am doing? Next
    Means that what course and program I chose.
    To become a AI and machine learning expert.

  • @teju4443
    @teju4443 8 месяцев назад

    Which software you are used in this tutorial mam ?

  • @sparrowyt7366
    @sparrowyt7366 9 месяцев назад

    Can't we use join() instead of for loop

  • @ritikpatel6520
    @ritikpatel6520 Год назад +8

    Instead of typing all alphabets u can use this :
    import random
    letter=[]
    for i in range(ord('a'), ord('z')+1):
    letter.append(chr(i))
    for i in range(ord('A'), ord('Z')+1):
    letter.append(chr(i))
    print(letter)
    number=[]
    for i in range(10):
    number.append(i)
    number[i]=str(number[i])
    print(number)
    symbol=['!','@','#','$','%','&','*','(',')','+']
    print("Welcome to the passworrd generator.")
    letters=int(input("How many letters would you like in your password? "))
    numbers=int(input("How many numbers would you like? "))
    symbols=int(input("How many symbols would you like? "))
    password_list=[]
    for i in range(1,letters+1):
    a=random.choice(letter)
    password_list+=a
    for i in range(1,numbers+1):
    b=random.choice(number)
    password_list+=b
    for i in range(1,symbols+1):
    c=random.choice(symbol)
    password_list+=c
    random.shuffle(password_list)
    password=""
    for i in password_list:
    password+=i
    print(password)

  • @vanteddualekhya2475
    @vanteddualekhya2475 Год назад +1

    Mam please start Java programming.....

  • @kasimkotabindusaisree5404
    @kasimkotabindusaisree5404 Год назад

    Mam when will you start Java mam

  • @PrashantKumar-tv1gd
    @PrashantKumar-tv1gd 25 дней назад

    mam why are you add pasword_list(which is list)and char(which is string)
    is this possible yo add string and list with the help of +=

  • @quantumaravinth
    @quantumaravinth Месяц назад

    Can we not automate instead of having to manually enter numbers, letters and strings? Is there a way?

  • @kts_computer
    @kts_computer Год назад +2

    Anyways passwords print only one letter ,😢😢😢.why?

  • @EqlimaSarwari
    @EqlimaSarwari Месяц назад

    Hello Pycharm is giving me this error: NameError: name 'n_letter' is not defined. Did you mean: 'letter'? I don't know why I have defined my variable properly but I am getting this error.

  • @DheerajKumarMG
    @DheerajKumarMG 12 дней назад

    Hi, doubt: do we need to initialize variable here password with empty string ?? Is it mandatory in python and can anyone give a reason pls

  • @Naveenvlogs1203
    @Naveenvlogs1203 7 месяцев назад

    17:35 ,I am trying with list but it is showing 'can only concatinate list(not "str" ) to list . I can understand this error . But how can we add elements to a list without using append?

    • @shiv_39
      @shiv_39 5 месяцев назад +1

      You can use extend instead of append

  • @telikapranay99
    @telikapranay99 Год назад +18

    Mam why don't you try to act in movies... ❤

  • @zuhragul739
    @zuhragul739 5 дней назад

    Output of this code is coming in multiple lines not concatinate in one line how to fix it maam

  • @manideepabusireddy5065
    @manideepabusireddy5065 7 месяцев назад

    What is the use of password generator in real life time

  • @user-qj9iy9pj1g
    @user-qj9iy9pj1g 4 месяца назад

    mam list can't be concatinate withstr

  • @bharathgamingyt8470
    @bharathgamingyt8470 Год назад

    Mam I love u so much ❤️

  • @barathkumarkarra5521
    @barathkumarkarra5521 7 месяцев назад

    import random
    f_list = []
    list1 = ['q','l','r','w']
    a = random.choice(list1)
    f_list += a # Here f_list is a list and a is of type string format, so how concatenation takes place
    print(f_list)
    But why it is giving different output, could you please check and validate?
    Thanks in advance sir/mam, If you explain earlier...
    Anyone who observed my comment is going to answer should be highly appreciated..

  • @seemakasture6053
    @seemakasture6053 20 дней назад

    Hello ma'am
    I have one query

  • @ahmadparsi6795
    @ahmadparsi6795 9 месяцев назад

    import random
    import string
    list1 = []
    list2 = []
    list3 = []
    password = ''
    user1 = int(input("how many digits do you want for password? "))
    for digits in range(user1):
    digits = list1.append(random.choice(string.digits))
    user2 = int(input("how many symbols do you want for password? "))
    for symbols in range(user2):
    symbols = list2.append(random.choice(string.punctuation))
    user3 = int(input("how many chars do you want for password? "))
    for chars in range(user3):
    chars = list3.append(random.choice(string.ascii_letters))
    key = list1 + list2 + list3
    random.shuffle(key)
    for i in key:
    password += i
    print(password)

  • @pariabagherifaez9437
    @pariabagherifaez9437 7 месяцев назад

    import random
    import string
    letters = string.ascii_letters
    digits = string.digits
    special_chars = string.punctuation
    alphabet = letters + digits + special_chars
    print("welcome to password generator")
    password_len = int(input("how many characters you want in your password"))
    password = ""
    for i in range(1,password_len+1):
    char = random.choice(alphabet)
    password+=char
    print(password)

    • @venubanoth3610
      @venubanoth3610 5 месяцев назад

      But it's not specific. If I want a password with only two characters, only two numbers and only 2 letters, It fails to provide it. Isn't it?

  • @ENA911
    @ENA911 Год назад

    I love your teaching and your eyes I will come to India and I married with you love for Afghanistan ♥️🇦🇫

  • @user-tr5ly2wv6k
    @user-tr5ly2wv6k Месяц назад

    import random
    import string
    x = int(input('how many letters should includ?'))
    y = int(input('how many symbols should includ?'))
    z = int(input('how many numbers should includ?'))
    password = []
    for i in range(x):
    random_letter = random.choice(string.ascii_letters)
    password.append(random_letter)
    for i in range(y):
    random_symbol = random.choice(string.punctuation)
    password.append(random_symbol)
    for i in range(z):
    random_integer = random.randint(0, 10)
    password.append(random_integer)
    key = password[:]
    random.shuffle(key)
    shuffeld_key = ''.join(map(str, key))
    print(shuffeld_key)

  • @lavishkumar8904
    @lavishkumar8904 Год назад

    cutie patootiee

  • @_B_vikramJangir
    @_B_vikramJangir 6 месяцев назад

    mam you are so beautiful

  • @captaintariq6350
    @captaintariq6350 Месяц назад

    Your code will always skip
    'a' '0' '!'

  • @mounimounika2611
    @mounimounika2611 5 месяцев назад +1

    I have written directly with random.sample instead of For loop 3 times
    import random
    alphabets_num = input("how many alphabets you want for the password: ")
    alphabets = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
    random_alphabets = random.sample(alphabets, int(alphabets_num))
    print(random_alphabets)
    numbers_num = input("how many numbers you want for the password: ")
    numbers = ["1","2","3","4","5","6","7","8","9","0"]
    random_numbers = random.sample(numbers,int(numbers_num))
    print(random_numbers)
    splchar_num = input("how many special characters you want for the password: ")
    splchars = ["!","@","#","$","%","&","*",":","?"]
    random_splchar = random.sample(splchars, int(splchar_num))
    print(random_splchar)
    password = random_alphabets + random_numbers +random_splchar
    random_pass = ""
    for i in password:
    random_pass = random_pass + i
    print(random_pass)

  • @sigmatronX
    @sigmatronX 2 месяца назад

    #Password generator program
    import random
    print("Welcome, to the password generator.")
    letrs = int(input("Please, enter how many letters you want in your password: "))
    numsins = int(input("Please, enter how many numbers you want in your password: "))
    symb = int(input("Please, enter how many symbols you want in your password: "))
    letters = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
    nums = ['0','1','2','3','4','5','6','7','8','9']
    symbols = ['!','@','#','$','%','^','&','*','(',')','','?','/',':',';','{','[','}',']','|','+','=','-','_']
    password = ""
    for i in range(0,letrs):
    password += random.choice(letters)
    for i in range(0, numsins):
    password += random.choice(nums)
    for i in range(0, symb):
    password += random.choice(symbols)
    #print(type(password))
    #print(password)
    list_password = list(password) #because shuffle only works on mutable sequences and doesn't work on strings which are immutable
    #print(list_password)
    #print(type(list_password))
    random.shuffle(list_password)
    #print(list_password)
    final_pw = ''
    for i in list_password: #to remove the commas and the square brackets and display as plain string
    final_pw += i
    print(f"Your password is: {final_pw}")

  • @barathkumarkarra5521
    @barathkumarkarra5521 7 месяцев назад

    import random
    f_list = []
    list1 = ['q','l','r','w']
    a = random.choice(list1)
    f_list += a # Here f_list is a list and a is of type string format, so how concatenation takes place
    print(f_list)
    But why it is giving different output, could you please check and validate?
    Thanks in advance sir/mam, If you explain earlier...
    Anyone who observed my comment is going to answer should be highly appreciated..