+ 1

How

How do you end a program using an ‘if‘ and an ‘else’. For example if the user enters the wrong password into the program it ends the program. Is there a command?

20th Feb 2018, 6:29 PM
Floof McBork
Floof McBork - avatar
3 Answers
+ 4
if ... : exit(1)
20th Feb 2018, 6:52 PM
Вадим Сухотин (Vadim Sukhotin)
Вадим Сухотин (Vadim Sukhotin) - avatar
+ 2
Check out this email validator that can easily be adapted to a pw checker : https://code.sololearn.com/cnbUBK5uKvnG/?ref=app
5th May 2018, 7:31 AM
Johannes
Johannes - avatar
0
Hello. Sorry, i can write this, but only on the JavaScript. 😅
20th Feb 2018, 6:31 PM
Otabek Yunusov
Otabek Yunusov - avatar