+ 5
How to add alerts in python?
How can we add alerts linke in JS alert() so that the user of the code can know that what he has to input.
5 Antworten
+ 2
You can do that with exception handling
https://code.sololearn.com/cS23229f7GOe/?ref=app
+ 7
What do you think about this one? There is an alert box here... I have never seen the better alerts for python!!!
https://code.sololearn.com/cey1rm5X9PYC/?ref=app
https://code.sololearn.com/cNsKyh6qJxv0/?ref=app
+ 3
thanks for your time
+ 2
You can't do that. It's better to add nice little comment for user in your code or provide helpful string in input() which will make user comfortable with inputs.
+ 2
Can I add error message then, if the input is wrong. For example in the following code I want to put an error message if the input is not between 1 and 6.
https://code.sololearn.com/c86UK9B1STi4/?ref=app