Question: 3 . Write a Python program ( named YourName _ SID _ Lab 7 c . py ) to a ) Let user enter a
Write a Python program named YourNameSIDLabcpy to
a Let user enter a string
b Extract the first five characters of the input string, and display the result
Use slicing expression to select the first five characters from to from the input string.
Display the selected string on screen
c Reverse the string and display the result
Convert the string, with slicing in a reverse order.
Display the string in reverse order, eg Hello olleH
Sample Program Output:
CCIT Laboratory : Section
Enter a string: Philosophy is a lovely subject!
First five characters are Philo
Reversed string is: tcejbus ylevol a si yhposolinP
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
