Question: Using the operator to paste together two strings can be very useful in building custom messages. Suppose, for example, that you've calculated your savings want
Using the operator to paste together two strings can be very useful in building custom messages.
Suppose, for example, that you've calculated your savings want to summarize the results in a string.
To do this, you'll need to explicitly convert the types of your variables. More specifically, you'll need to convert a value into a string. str savings for example, will convert the integer savings to a string.
Similar functions such as int float and bool will help you convert Python values into any type.
Instructions
Hit Run Code to run the code. Try to understand the error message.
Fix the code such that the printout runs without errors; use the function to convert the variables savings and totalsavings to strings.
Convert the variable pistring to a float and store this float as a new variable,
x
Take Hint XP
Incorrect Submission
Did you define the variable pifloat without errors?
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
