0
I have a doubt in coding
coding to find entered value is uppercase or lower case
9 Answers
+ 1
To check if string is in uppercase, use the string method isupper ()
To check if it is lowercase, use islower ()
E.g.
s = input ()
if s.islower ():
print ("The input is in lowercase")
elif s.isupper ():
print ("The input is in uppercase")
else: print ("The input is in mixed case")
0
it's input.
x = input(" ")
print(x)
0
x=input(" ")
print(x) it is fine but you will reveal the answer alone but I need to print the entered char is uppercase or lowercase for ex if you entered A means print upper case a means lowercase
0
If I understand you correctly, use "in".
0
If I understand you correctly, use "in".
0
can you make code for it
0
If I understand you correctly, you can't actually tell if one inputs uppercase or lowercase. But you can convert the user entered value to either uppercase or lower case to suit your needs. Example:
your_name = input ("enter your name: ")
your_name = your_name.lower()
print(your_name)
your_name = your_name.upper()
print(your_name)
0
it shows error it needs any module
0
islower(), isupper()
sorry typo in the example
corrected now