This Python program prints all the letters of the English alphabet from 'A' to 'Z'.
For each uppercase letter, its corresponding lowercase letter is printed on the same line.
for ch in range(ord('A'), ord('Z') + 1):
uppercase = chr(ch)
lowercase = chr(ch + 32)
print(f"{uppercase} {lowercase}")
A a
B b
C c
...
Y y
Z z
- The loop uses ord() to get the ASCII value of each uppercase letter
- chr() converts the numeric code back to a character
- The lowercase version is calculated by adding 32 to the uppercase ASCII code
- Each pair is printed together in order