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

Поділитися
Вставка
  • Опубліковано 4 жов 2024

КОМЕНТАРІ • 96

  • @seenumadhavan4451
    @seenumadhavan4451 Рік тому +28

    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)

  • @sugan7882
    @sugan7882 Рік тому +4

    Thank u mam for ur wonderful presentation.

  • @kusmareddy1139
    @kusmareddy1139 7 місяців тому +1

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

  • @rongalamanindra5279
    @rongalamanindra5279 Рік тому +2

    Thank you so much mam please continue python mam

  • @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

  • @ravadarajasehkar5497
    @ravadarajasehkar5497 Рік тому +2

    Mam,Thankyou very much for coming back 🎉🎉🎉

  • @mwangikagwi5349
    @mwangikagwi5349 6 місяців тому

    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.

  • @itsme-sm9jp
    @itsme-sm9jp 7 місяців тому

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

  • @ankitpathak9334
    @ankitpathak9334 4 місяці тому

    Appreciated 💯💯

  • @akshitajain5517
    @akshitajain5517 Рік тому +5

    Di please continue your dbms series..

  • @pravinsingh3453
    @pravinsingh3453 Рік тому

    Tnx Jenny mam interesting project you teach 😘👏👏

  • @SS_ASSASSIN
    @SS_ASSASSIN 2 місяці тому

    Thanks ❤

  • @bharathgamingyt8470
    @bharathgamingyt8470 Рік тому +1

    Cuteness overloaded💓

  • @soorya_kv0304
    @soorya_kv0304 Рік тому +4

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

  • @karimwazahat
    @karimwazahat 4 місяці тому

    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

  • @shrikantdesai6973
    @shrikantdesai6973 7 місяців тому

    thanks for this project

  • @scientificalquran3642
    @scientificalquran3642 4 місяці тому

    i love your think sister.

  • @RitwikSharma-wq5vu
    @RitwikSharma-wq5vu Рік тому +4

    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 = '')

  • @muneebbolo
    @muneebbolo 8 місяців тому +2

    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 Рік тому +4

    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

  • @nireesha5494
    @nireesha5494 Рік тому

    Tq so much mam

  • @manfredmasiko4444
    @manfredmasiko4444 Рік тому

    I hadMissed your lecture that bad😀

  • @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 🥺🥺🙏🙏🥺🙏🙏🥺🙏

  • @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.

  • @zuhragul739
    @zuhragul739 3 місяці тому +1

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

  • @aarthiboopalan2814
    @aarthiboopalan2814 8 місяців тому

    Maam put video of sales insight of fmgc python project

  • @praneethamalakapalli3137
    @praneethamalakapalli3137 Рік тому +1

    Sister pls I want more projects on python plsplsssss

  • @Manojmanu-c2k
    @Manojmanu-c2k 11 місяців тому

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

  • @yasothakarthikeyan9604
    @yasothakarthikeyan9604 Рік тому

    Old Jenny is back

  • @teju4443
    @teju4443 11 місяців тому

    Which software you are used in this tutorial mam ?

  • @quantumaravinth
    @quantumaravinth 4 місяці тому

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

  • @ritikpatel6520
    @ritikpatel6520 Рік тому +9

    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)

  • @PrashantKumar-tv1gd
    @PrashantKumar-tv1gd 3 місяці тому

    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 +=

  • @pandipatipavan3804
    @pandipatipavan3804 Рік тому +2

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

  • @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

  • @kts_computer
    @kts_computer Рік тому +2

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

  • @ashdeepkashyap8717
    @ashdeepkashyap8717 Рік тому

    Mam please complete c++ series🙏🙏🙏🙏

  • @Namikazeminato071
    @Namikazeminato071 Рік тому

    Mam I'm come from Instagram 😮

  • @sparrowyt7366
    @sparrowyt7366 Рік тому

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

  • @EqlimaSarwari
    @EqlimaSarwari 4 місяці тому

    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.

  • @telikapranay99
    @telikapranay99 Рік тому +28

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

  • @DheerajKumarMG
    @DheerajKumarMG 3 місяці тому

    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

  • @SravaniGrandhisila
    @SravaniGrandhisila Місяць тому +1

    import random
    import string
    print("Welcome to Password Generator!")
    password=[]
    a=int(input("Enter how many letters would you like in password:"))
    for i in range(a):
    rand_alphabet=random.choice(string.ascii_letters)
    password.append(rand_alphabet)
    b=int(input("Enter how many symbols would you like:"))
    for j in range(b):
    rand_symbol=random.choice(string.punctuation)
    password.append(rand_symbol)
    c=int(input("Enter how many numbers would you like:"))
    for k in range(c):
    rand_num=str(random.randint(0,9))
    password.append(rand_num)
    random.shuffle(password)
    result=''.join(password)
    print(result)

  • @barathkumarkarra5521
    @barathkumarkarra5521 10 місяців тому

    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..

  • @vanteddualekhya2475
    @vanteddualekhya2475 Рік тому +1

    Mam please start Java programming.....

  • @bharathgamingyt8470
    @bharathgamingyt8470 Рік тому

    Mam I love u so much ❤️

  • @sakshimishra6450
    @sakshimishra6450 24 дні тому

    11:48

  • @seemakasture6053
    @seemakasture6053 3 місяці тому

    Hello ma'am
    I have one query

  • @esakkinathan6414
    @esakkinathan6414 2 місяці тому

    Mam I want fitness tracker program

  • @kasimkotabindusaisree5404
    @kasimkotabindusaisree5404 Рік тому

    Mam when will you start Java mam

  • @AnithaKorikana
    @AnithaKorikana 7 місяців тому

    mam list can't be concatinate withstr

  • @manideepabusireddy5065
    @manideepabusireddy5065 10 місяців тому

    What is the use of password generator in real life time

  • @1D.892
    @1D.892 Місяць тому

    import random
    import string
    print("welcome to the password generator")
    password = ""
    a = int(input("how many letters do you want:"))
    b = string.ascii_letters
    for i in range(0,a):
    king = random. choice(b)
    password = password + king
    d = int(input("how many symbols do you want:"))
    e = string.punctuation
    for i in range(0, d):
    queen = random. choice(e)
    password = password + queen
    f = int(input("how many digits do you want:"))
    g = string.digits
    for i in range(0, f):
    jack = random. choice(g)
    password = password + jack
    else:
    print("your password is:",password)

  • @Naveenvlogs1203
    @Naveenvlogs1203 10 місяців тому

    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?

    • @Gouri_39
      @Gouri_39 8 місяців тому +1

      You can use extend instead of append

  • @sandeepreddy862
    @sandeepreddy862 2 місяці тому

    import random
    import string
    password=''
    print('welcome to password generator')
    words=int(input("how many letters:-"))
    num=int(input("how many num:-"))
    symbol=int(input("how many symbol:-"))
    for i in range(1,words+1):
    char=random.choice(string.ascii_letters)
    password+=char
    for i in range(1,num+1):
    char=random.choice(string.digits)
    password+=char
    for i in range(1,symbol+1):
    char=random.choice(string.punctuation)
    password+=char
    password_list=list(password)
    random.shuffle(password_list)
    shuffled_password="".join(password_list)
    print(shuffled_password)

  • @ahmadparsi6795
    @ahmadparsi6795 Рік тому

    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)

  • @KaushalyaAmararathne
    @KaushalyaAmararathne 4 місяці тому

    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)

  • @pariabagherifaez9437
    @pariabagherifaez9437 10 місяців тому

    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 8 місяців тому

      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 ♥️🇦🇫

  • @captaintariq6350
    @captaintariq6350 4 місяці тому

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

  • @_B_vikramJangir
    @_B_vikramJangir 9 місяців тому

    mam you are so beautiful

  • @lavishkumar8904
    @lavishkumar8904 Рік тому

    cutie patootiee

  • @spoofs8205
    @spoofs8205 2 дні тому

    Mam you look like actress

  • @sigmatronX
    @sigmatronX 5 місяців тому

    #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}")

  • @mounimounika2611
    @mounimounika2611 8 місяців тому +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)

  • @harishm8461
    @harishm8461 2 місяці тому

    import random
    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']
    symbols = ['!', '"', '#', '$', '%', '&', "'", '(', ')', '*', '+',
    ',', '-', '.', '/', ':', ';', '', '?', '@',
    '[', '\\', ']', '^', '_', '`', '{', '|', '}', '~']
    # print(letter)
    # print(number)
    print("Welcome to the password generator!")
    required_letters = int(input("how many letters would you like in your password"))
    required_numbers = int(input("how many numbers would you like in your password"))
    required_symbols = int(input("how many symbols would you like in your password"))
    generated = ""
    for i in range(required_letters):
    letter = random.choice(letters)
    generated += f"{letter}"
    for j in range(required_numbers):
    number = str(random.randint(0, 9))
    generated += f"{number}"
    for k in range(required_symbols):
    symbol = random.choice(symbols)
    generated += f"{symbol}"
    print(generated)

  • @iam-irfan
    @iam-irfan 20 днів тому

    import random
    """Password genarator"""
    small=['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']
    caps=['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']
    special=['!', '"', '#', '$', '%', '&', "'", '(', ')', '*']
    numbers=[1,2,3,4,5,6,7,8,9,10]
    choice1=int(input("how many small charecters you need your password"))
    choice2=int(input("how many Capital charecters you need your password"))
    choice3=int(input("how many special charecters you need your password"))
    choice4=int(input("how many numbers charecters you need your password"))
    random1=[random.choice(small) for _ in range(choice1)]
    random2=[random.choice(caps) for _ in range(choice2)]
    random3=[random.choice(special) for _ in range(choice3)]
    random4=[random.choice(numbers) for _ in range(choice1)]
    password=random1+random2+random3+random4
    print("your password is")
    for i in password:
    print(i,end="")

  • @TheaSerola
    @TheaSerola 2 місяці тому

    import random
    alpha=['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']
    num= ['0','1','2','3','4','5','6','7','8','9']
    sym=['!','@','#','$','%','&','*']
    l=[]
    A=int(input('ENTER NO OF ALPHABETS'))
    N=int(input('ENTER NO OF num'))
    S=int(input('ENTER NO OF symbols'))
    for i in range(0,A):
    a= random.choice(alpha)
    l.append(a)
    for i in range(0,N):
    n= random.choice(num)
    l.append(n)
    for i in range(0,S):
    s= random.choice(sym)
    l.append(s)
    random.shuffle(l)
    print(l)

  • @barathkumarkarra5521
    @barathkumarkarra5521 10 місяців тому

    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..