Objective
Develop a Python program to print the letters "B" to "N" (uppercase), using a "for" loop.
Example Python Exercise
Show Python Code
# Loop through the letters from 'B' to 'N' (inclusive)
for letter in range(ord('B'), ord('N') + 1):
print(chr(letter))
Output
B
C
D
E
F
G
H
I
J
K
L
M
N
Share this Python Exercise
More Python Programming Exercises of Python Data Types
Explore our set of Python Programming Exercises! Specifically designed for beginners, these exercises will help you develop a solid understanding of the basics of Python. From variables and data types to control structures and simple functions, each exercise is crafted to challenge you incrementally as you build confidence in coding in Python.
This Python program calculates an approximation for PI using the series expression: pi/4 = 1/1 - 1/3 + 1/5 - 1/7 + 1/9 - 1/11 + 1/13 ... The program allows t...
This Python program calculates the perimeter, area, and diagonal of a rectangle based on its width and height. The program prompts ...
This Python program prompts the user to enter a number and then displays its equivalent values in both hexadecimal and binary formats. The program conti...
This Python program prompts the user to enter a decimal number and displays its equivalent in binary form. Instead of using the str() function, the prog...
This Python program uses the conditional operator to assign a boolean variable named "bothEven" the value "True" if both numbers entered by the user are...
This Python program prompts the user for a real number and displays its square root. The program uses a "try...except" block to handle any potential err...