Question: IN PYTHON PLEASE. Your program will take a string as an input and using slice and find function, to extract a string after a colon.

IN PYTHON PLEASE.

Your program will take a string as an input and using slice and find function, to extract a string after a colon. Then, convert it to floating point number and add 2.0 to it and print output displaying following with input provided as follows:

=================================================

Enter a string with a colon and a number after it.: This is a sample string with number: 1.542

Extracted a number from given string and added 2.0 to it: 3.542

=================================================

Ask user for an input string and using slice and find function, separate a string after the colon. Then convert it to a floating point number so that you can add 2.0 to it.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!