In this python if else program, we will check whether a given character is uppercase or not.
Steps to solve the program
- Take a character as input through the user.
- Check whether a given character is uppercase or not using isupper().
- Use an if-else statement for this purpose.
- Print the output.
char = input("Enter a character: ")
if char.isupper():
print("True")
else:
print("False")
Output :
Enter a character: A
True
Related Articles
Python program to check whether the given character is lowercase or not.
Python program to check whether the given number is an integer or not.
Python program to check whether the given number is float or not.
Python program to check whether the given input is a string or not.
Python program to print all the numbers from 10-15 except 13.
Python program to find the electricity bill. According to the following conditions: