Question
This is for Python 3.1 This problem tests your string manipulation skills. Prompt the user to enter a sentence that ends with a price with
This is for Python 3.1
This problem tests your string manipulation skills.
Prompt the user to enter a sentence that ends with a price with a '$' in front of it. Find the index position of the price. Then display both the index and the price. Note that the sentence provided by the user can be of any length, so long as it ends with a price.
Your display should look like this. User input is indicated with a red underline:
Please give us a sentence about item you bought.
End the sentence with its price, including the dollar sign.
Item and price: I found Nike golf balls on sale for $22.95.
The price is at index position: 36
The price is $22.95.
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