No video

Python Tutorial - For Loop - Passwords

Пікірлер: 25

  • @mirashiki1739
    @mirashiki1739 Жыл бұрын

    Thanks for the tutorial, really needed it for computer assignment

  • @tylersanada508
    @tylersanada5083 жыл бұрын

    This was very helpful. Thanks.

  • @barringtonpatterson6449
    @barringtonpatterson64493 жыл бұрын

    you have just earned a new sub :)

  • @sirkingsomo1
    @sirkingsomo1 Жыл бұрын

    Wow three years ago, and am just learning it now..... thanks for the video, it was helpful, straight to the point..... please I need help getting a remote internship with...even though am not been paid huge amount....

  • @hernanaquino7100
    @hernanaquino71002 жыл бұрын

    thanks for this , you help me bro

  • @faizanmadki5711
    @faizanmadki57114 жыл бұрын

    If you enter first 2 attempts wrong code but in the 3 rd attempt if I enter correct password it says you have been denied access

  • @homeresquivel8960

    @homeresquivel8960

    3 жыл бұрын

    How do you fix this?

  • @TamLe-yh3eg

    @TamLe-yh3eg

    3 жыл бұрын

    print( "Hi man, you have 3 attempts ") password="123456" for i in range(3,0,-1): attempt=input("password?: ") if attempt == password: print("WELCOME") break if attempt != password: i = i-1 print("INCORRECT, you have", i ,"attempts left") continue if i == 0: print("You've ran out of attempts") Try this one i think this is better

  • @sairajmarshetty7152

    @sairajmarshetty7152

    2 жыл бұрын

    @@TamLe-yh3eg if i want to add username ??how can i do it

  • @TamLe-yh3eg

    @TamLe-yh3eg

    2 жыл бұрын

    assign name = input("What is ur username?: ") then the print line will be print('Hi', name, 'you have 3 attempts') so when you input any username the command will send a greeting

  • @scytnx3914
    @scytnx3914 Жыл бұрын

    after the second "else:" i got error. Can somebody tell me why and how to fix it?

  • @gaurangparulekar363
    @gaurangparulekar363 Жыл бұрын

    If there are two block of code for example password which you just showed and second are some steps if I do run all and give 4incorrect password in last attempt it will give you acess denied but below code will work am I right

  • @soggy1566
    @soggy15663 жыл бұрын

    This is a bit off topic but how does the date on the calendar say oct 2 when this video was uploaded oct 1?

  • @GeekTutorials1

    @GeekTutorials1

    3 жыл бұрын

    Well spotted ;)

  • @megamagma4422
    @megamagma44222 жыл бұрын

    This tutorial is really good but has 1 problem - If you enter the right answer it will break and the same thing at denied 3 attempts, how do I make it lock?

  • @henrydanjayag6703

    @henrydanjayag6703

    Жыл бұрын

    Try on line 10: change if i == 1: to, if i == 4:

  • @carliechapman4188
    @carliechapman41884 жыл бұрын

    it say access denied because the word break doesnt work

  • @willclifford7314
    @willclifford73144 жыл бұрын

    it only gives you two attempts, how do you fix that?

  • @GeekTutorials1

    @GeekTutorials1

    4 жыл бұрын

    If you wish to change the number of attempts, change the numbers in the brackets at the for loop line of code. Maybe try changing the 3 to a 4, which would read for i in range(4, 0, -1)

  • @europeguy78

    @europeguy78

    4 жыл бұрын

    print( " Hi man , you have 3 attempts ") password = "sun" for i in range(0,3): enter_password = input("Enter the password : ") j=2 if enter_password == password: print("Password has been accepted") break elif i print("Incorrect password try again, attempt number ",j+i) else: print("fuck off, you have been denied acces :-)") continue print(" have a nice day")

  • @satorugojo9529
    @satorugojo95293 жыл бұрын

    wow nice tutorial but when i type the wrong password 3 times it dosent do anything it just makes the user see the other codes input so simple question is how do i make it so that when you type the password 3 wrong times it should not show what the next thing is

  • @GeekTutorials1

    @GeekTutorials1

    3 жыл бұрын

    You must have missed something in the code - my app does what you are saying, doesn't it?

  • @satorugojo9529

    @satorugojo9529

    3 жыл бұрын

    @@GeekTutorials1 it does everything thing perfectly but if the user gets the password wrong it still shows them the thing

  • @muhammadhasan7551
    @muhammadhasan75513 жыл бұрын

    man can i copy pasta it

  • @GeekTutorials1

    @GeekTutorials1

    3 жыл бұрын

    Yes