E
E
Eric Filler2016-05-24 21:14:25
Python
Eric Filler, 2016-05-24 21:14:25

Python: how to close console in the middle?

Hello, I ran into such a problem, I wrote the "password" code according to Dawson's book, and I need the console to close if the password is written incorrectly, but for some reason it does not close, I think because of the following line with an input that does not close the console, and another question about import random, can it be written anywhere, or only at the beginning?3e0c25c5c5d0435080e123587dc139f7.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GavriKos, 2016-05-24
@johnpoljones

About random - in theory - anywhere, but before you need its methods. Better - in the beginning.
About closing the console - you understood everything correctly, the console does not close due to waiting for input. Change it to methods and use return.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question