Question
Write a program to show users a set of choices, and then respond to those choices until they choose to quit (q). For each option,
Write a program to show users a set of choices, and then respond to those choices until they choose to quit (q).
For each option, write a function. Each function should do as follows:
halfstring() Ask the user to enter the string of even length. Your function should display the last half string. For example, HelloWorld should display World.
first_three_char() As the k user to enter the string. Your function should display the string made up of the first three characters. For example, HelloWorld will display Hel.
If the string is shorter than length 3, display whatever there is, so "He" yields "He", and the string is empty, then display Empty String.
When a user enters q, it should display See you later. See the sample output.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started