Python : Asking the user for input until they give a valid response

  Рет қаралды 10,571

Bytive

Bytive

Күн бұрын

Video Tutorial shows the step by step guide to create a python program for taking input from user, until he gives a valid response.
Stack overflow link : stackoverflow....

Пікірлер: 7
@abelwolf7141
@abelwolf7141 2 жыл бұрын
thank you so much please keep making more python examples. i did your exact same code but i didnt have the continue the last one after the flag == True and print , i just left it like that without a continue , and the code worked fine
@meettewar9355
@meettewar9355 Жыл бұрын
Thanks bro! I got clue to finish my assignment with your codes.
@KhalilYasser
@KhalilYasser 3 жыл бұрын
Thanks a lot. The statement `flag = False` should be after `while True`. Try run your code and type a capital letter in the username then in the same execution type a valid username with lowercase, you will get the message `sorry, no capital letters` each time as flag is marked as True. so I think it will be better to put the flag=False after while True.
@bytive
@bytive 3 жыл бұрын
Thanks for the suggestion I agree with you, this will be more optimized version of code 😊
@frasercoyle9797
@frasercoyle9797 2 жыл бұрын
Thanks for the correction! I couldn't figure out how to resolve that issue until I read your comment.
@pini5076
@pini5076 Жыл бұрын
Thank you so much!
@rohanbangash5827
@rohanbangash5827 2 жыл бұрын
Thanks a lot, this solved my issue
While loops in Python are easy ♾️
6:58
Bro Code
Рет қаралды 389 М.
This Is Why Python Data Classes Are Awesome
22:19
ArjanCodes
Рет қаралды 810 М.
Good teacher wows kids with practical examples #shorts
00:32
I migliori trucchetti di Fabiosa
Рет қаралды 13 МЛН
How I Turned a Lolipop Into A New One 🤯🍭
00:19
Wian
Рет қаралды 12 МЛН
Input a List using Loops in Python
10:24
Neso Academy
Рет қаралды 40 М.
How to Overwrite Previous Printed Line in Python | Print Without Newline | Carriage Return
12:14
Fabio Musanni - Programming Channel
Рет қаралды 23 М.
The Basics of while Loop in Python
8:17
Neso Academy
Рет қаралды 54 М.
List Comprehension - BEST Python feature !!! Fast and Efficient
14:51
Python Simplified
Рет қаралды 195 М.
6 Tips to write BETTER For Loops in Python
9:19
Patrick Loeber
Рет қаралды 249 М.
Python 101: Learn the 5 Must-Know Concepts
20:00
Tech With Tim
Рет қаралды 1,2 МЛН
How to Validate User Inputs in Python | Input Validation in Python
14:14
Fabio Musanni - Programming Channel
Рет қаралды 41 М.
"break" & "continue" Statements in Python #10
8:01
Programiz
Рет қаралды 101 М.