Question: Create a Python program file called Ch 0 6 - 1 _ Name.py . ( Replace Name with your initial of first name and first

Create a Python program file called Ch06-1_Name.py.(Replace Name with your initial of first name and first 5 letters of last name. If your last name is shorter than 5 letters, just use full last name, it doesn't have to be 5 letters. i.e. if your name is John Doe, your file name should be Ch06-1_JDoe.py)
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. Print output displaying the number as following example shows:
=================================================
Entera 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
=================================================

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 Programming Questions!