+ 1

How to raise input error if input is given other than a character in python?

in the code 'hidden meaning of your name' if a number or special character is given as input i want to learn if i can show it as an input error

10th Dec 2017, 2:59 AM
Rahul Shaikh
Rahul Shaikh - avatar
6 Antworten
+ 3
ok i will try it....thanks for your help
10th Dec 2017, 3:24 AM
Rahul Shaikh
Rahul Shaikh - avatar
+ 3
thanks for your help Ace.....at last my problem is solved☺☺
10th Dec 2017, 1:35 PM
Rahul Shaikh
Rahul Shaikh - avatar
+ 2
will it work for str such as i want to get input only of characters and someone has given an input frahh5r1.....i want to show value error now and as the number when taking as input is converted as string i think it will not show the exception
10th Dec 2017, 3:18 AM
Rahul Shaikh
Rahul Shaikh - avatar
+ 2
https://code.sololearn.com/c9xmb9gSbJ3S/?ref=app i have thought about this.Is this okay?
10th Dec 2017, 7:58 AM
Rahul Shaikh
Rahul Shaikh - avatar
+ 2
can't i raise exception in this code ....then it will be okay i thought..... that's why i asked if it is okay
10th Dec 2017, 1:23 PM
Rahul Shaikh
Rahul Shaikh - avatar
+ 1
can you give me an example code.....i am having a hard time to grasp it
10th Dec 2017, 3:06 AM
Rahul Shaikh
Rahul Shaikh - avatar