Please write a program which asks the user for three letters. The program should then print out whichever of the three letters would be in the middle if the letters were in alphabetical order. You may assume the letters will be either all uppercase, or all lowercase.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Can you use Python programming language to to this question?

Thanks

Please write a program which asks the user for three letters. The program should then
print out whichever of the three letters would be in the middle if the letters were in
alphabetical order.
You may assume the letters will be either all uppercase, or all lowercase.
Some examples of expected behaviour:
1st letter: x
2nd letter: c
3rd letter: p
The letter in the middle is p
1st letter: C
2nd letter: B
3rd letter: A
The letter in the middle is B
1
# Write your solution here
Sample output
mple utput
Transcribed Image Text:Please write a program which asks the user for three letters. The program should then print out whichever of the three letters would be in the middle if the letters were in alphabetical order. You may assume the letters will be either all uppercase, or all lowercase. Some examples of expected behaviour: 1st letter: x 2nd letter: c 3rd letter: p The letter in the middle is p 1st letter: C 2nd letter: B 3rd letter: A The letter in the middle is B 1 # Write your solution here Sample output mple utput
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

Hello..Its no correct....Can you help me?

Please write a program which asks the user for three letters. The program should then
print out whichever of the three letters would be in the middle if the letters were in
alphabetical order.
You may assume the letters will be either all uppercase, or all lowercase.
Some examples of expected behaviour:
1st letter: x
2nd letter: c
3rd letter: p
The letter in the middle is p
1st letter: C
2nd letter: B
3rd letter: A
The letter in the middle is B
1234 in
s = [L1, L2, L3] # Unsorted list of inputs.
RUN
sorted_1s = sorted (1s) # Sorted list of inputs.
5 print (f"Median: (sorted_1s [1]}") # Median is always at index 1.
TEST Reset
Test Results
FAIL: PythonEditor Test: test_middle_first
name 'L1' is not defined
Sample output
Sample output
Need help? Close
Transcribed Image Text:Please write a program which asks the user for three letters. The program should then print out whichever of the three letters would be in the middle if the letters were in alphabetical order. You may assume the letters will be either all uppercase, or all lowercase. Some examples of expected behaviour: 1st letter: x 2nd letter: c 3rd letter: p The letter in the middle is p 1st letter: C 2nd letter: B 3rd letter: A The letter in the middle is B 1234 in s = [L1, L2, L3] # Unsorted list of inputs. RUN sorted_1s = sorted (1s) # Sorted list of inputs. 5 print (f"Median: (sorted_1s [1]}") # Median is always at index 1. TEST Reset Test Results FAIL: PythonEditor Test: test_middle_first name 'L1' is not defined Sample output Sample output Need help? Close
Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Program on Numbers
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education