Question: Using Python w rite the following function and provide a program to test it (main and function in one . py ) def readFloat (prompt)

Using Python write the following function and provide a program to test it (main and function in one .py)
def readFloat(prompt)
that displays the prompt string, followed by a space, reads a floating-point number in, and returns it. Below is how youregoing to call the function:
salary = readFloat(Please enter your salary:)
percentageRaise = readFloat(What percentage raise would you like?)
print("The salary is", salary)
print("The raise percentage is", percentageRaise)
1) please code with comments and screenshot results

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!