Question: Complete the starter code and utilize code comments to follow along the design logic ( see the attached file ReverseWordToDo.py Download ReverseWordToDo.py ) , ReverseWordToDo.py
Complete the starter code and utilize code comments to follow along the design logic see the attached file ReverseWordToDo.py Download ReverseWordToDo.py ReverseWordToDo.py CiUsers
athDownload
ReverseWordToDo.py
File Edit Format Run Options Window Help
Reversing a word
A stack is used to reverse the letters.
First, the characters are extracted one by one from the input string and pushed onto the stack.
Then they're popped off the stack and displayed. Because of its lastin firstout characteristic,
the stack reverses the order of the characters.
Example:
Word to reverse: draw
The reverse of draw is ward
# A program to reverse the letters of a word
#imnort stack class
# Create a stack to hold letters
#Get user input
# I.oon over letters in word.
# Push letters on stack if not full.
# Build the reversed version
# Build the reversed version # Print reverse the letters of a word
After completing the previous assignment for Stack.py incorporate it together with the ReverseWord.py code that calls the functionality from Stack.pyFile Edit Format Run
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
