Check whether a given character is uppercase or not.

In this python if else program, we will check whether a given character is uppercase or not.

Steps to solve the program
  1. Take a character as input through the user.
  2. Check whether a given character is uppercase or not using isupper().
  3. Use an if-else statement for this purpose.
  4. Print the output.
				
					char = input("Enter a character: ")
if char.isupper():
    print("True")
else:
    print("False")
				
			

Output :

				
					Enter a character: A
True
				
			

Related Articles

print the largest number from two numbers.

check whether the given character is lowercase or not.

Leave a Comment