Print Alphabets
Coding Problem Keys
Print Alphabets
Problem Statement
Given two alphabets C1 and C2 as input, the program must print the alphabets from C1 to C2 (inclusive of C1 and C2).Boundary Condition(s)
a <= C1 < zC1 < C2 <= z
Input Format
The first line contains the two alphabets C1 and C2 separated by space(s).Output Format
The first line contains the alphabets from C1 to C2 (inclusive of C1 and C2) separated by a space.Example Input/Output 1
Input
a dOutput
a b c d
Explanation
The alphabets from a to d is abcd. Hence the output is a b c d.
Example Input/Output 2
Input
g lOutput
g h i j k lExplanation
The alphabets from g to l is ghijkl. Hence the output is g h i j k l.
Max Execution Time Limit: 5000 millisecs
Solution
Programming Language: Python 3 Language
a,b=input().split()
for i in range(ord(a),ord(b)+1):
print(chr(i),end=" ")
# Published By PKJCODERS
(Note: Incase If the code doesn't Pass the output kindly comment us with your feedback to help us improvise.)
Comments