Move python question files to 'questions' directory Move output files to 'outputs' directory Copy output files to 'questions' for ease of viewing Signed-off-by: Neil <neil@willofsteel.me>
16 lines
484 B
Python
16 lines
484 B
Python
# Question: Write a Python program to check if a character is an uppercase or lowercase letter.
|
|
|
|
def main(char: str) -> None:
|
|
if char.isupper():
|
|
print(f"{char} is an uppercase letter.")
|
|
elif char.islower():
|
|
print(f"{char} is a lowercase letter.")
|
|
else:
|
|
raise ValueError("Invalid input. Please enter an alphabetic character.")
|
|
|
|
if __name__ == '__main__':
|
|
main('A')
|
|
main('a')
|
|
main('B')
|
|
main('b')
|
|
main('1') # also works with a int |