Python Tutorial - For Loop - Passwords

  Рет қаралды 16,299

Geek Tutorials

Geek Tutorials

Күн бұрын

Пікірлер: 25
@mirashiki1739
@mirashiki1739 Жыл бұрын
Thanks for the tutorial, really needed it for computer assignment
@barringtonpatterson6449
@barringtonpatterson6449 4 жыл бұрын
you have just earned a new sub :)
@tylersanada508
@tylersanada508 3 жыл бұрын
This was very helpful. Thanks.
@sirkingsomo1
@sirkingsomo1 2 жыл бұрын
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....
@soggy1566
@soggy1566 3 жыл бұрын
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 ;)
@gaurangparulekar363
@gaurangparulekar363 2 жыл бұрын
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
@scytnx3914
@scytnx3914 2 жыл бұрын
after the second "else:" i got error. Can somebody tell me why and how to fix it?
@faizanmadki5711
@faizanmadki5711 4 жыл бұрын
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 3 жыл бұрын
@@TamLe-yh3eg if i want to add username ??how can i do it
@TamLe-yh3eg
@TamLe-yh3eg 3 жыл бұрын
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
@hernanaquino7100
@hernanaquino7100 3 жыл бұрын
thanks for this , you help me bro
@megamagma4422
@megamagma4422 2 жыл бұрын
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:
@willclifford7314
@willclifford7314 5 жыл бұрын
it only gives you two attempts, how do you fix that?
@GeekTutorials1
@GeekTutorials1 5 жыл бұрын
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 < 2: 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
@satorugojo9529 4 жыл бұрын
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 4 жыл бұрын
You must have missed something in the code - my app does what you are saying, doesn't it?
@satorugojo9529
@satorugojo9529 4 жыл бұрын
@@GeekTutorials1 it does everything thing perfectly but if the user gets the password wrong it still shows them the thing
@muhammadhasan7551
@muhammadhasan7551 4 жыл бұрын
man can i copy pasta it
@GeekTutorials1
@GeekTutorials1 4 жыл бұрын
Yes
@carliechapman4188
@carliechapman4188 4 жыл бұрын
it say access denied because the word break doesnt work
Python Tutorial - For Loop - Times Tables
5:30
Geek Tutorials
Рет қаралды 9 М.
Introduction to For Loops in Python (Python Tutorial #5)
10:22
CS Dojo
Рет қаралды 1,6 МЛН
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 108 МЛН
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 62 МЛН
5 Good Python Habits
17:35
Indently
Рет қаралды 659 М.
While loops in Python are easy ♾️
6:58
Bro Code
Рет қаралды 435 М.
Recursion 'Super Power' (in Python) - Computerphile
12:18
Computerphile
Рет қаралды 492 М.
Python for Beginners - Learn Coding with Python in 1 Hour
1:00:06
Programming with Mosh
Рет қаралды 19 МЛН
Project Based Python: Username and Password
20:32
TMD Studios
Рет қаралды 9 М.
Python Tutorial - Multiple Choice Quiz
17:20
Geek Tutorials
Рет қаралды 84 М.
Python Tutorial - While Loop - Dice Game
12:17
Geek Tutorials
Рет қаралды 44 М.
Python For Loops - Python Tutorial for Absolute Beginners
14:42
Programming with Mosh
Рет қаралды 637 М.
Python Login Program Tutorial - For Beginners
11:09
ShawCode
Рет қаралды 7 М.