Question: This extra practice has multiple pages in increasing level of difficulty. You will get the most out of this practice if you do them in
This extra practice has multiple pages in increasing level of difficulty. You will get the most out of this practice if you do them in sequential order.
This extra practice is a challenge. It will use a concept that is not formally introduced until the next chapter, which is arithmetic operators.
Refer back to the page Getting Numeric Input from the Input lesson where we discussed the difference between concatenation and getting the sum. Calculating the sum is the first instance of doing arithmetic. In this lab, we will take it one step further by doing multiplication. The operator for doing multiplication in Python is the asterisk If you have two variables, num and num you can perform multiplication of the values in those variables as follows:
printIm so smart I can multiply any two numbers!"
num intinputEnter the first number
num intinputEnter the second number
printThe product of the two numbers is num num
With this background information, complete all pages of this practice assignment.
Specification
Create a program to do the following:
Get input representing a number of coins from the user. Note: you should always provide a descriptive prompt to the user when asking for input, however, the specific prompt text will not be checked in this version of the problem
Get input representing the valueworth of a single coin from the user. See comment regarding descriptive prompts above
Calculate the total value of all coins number of coins multiplied by worth of single coin
Display a summary line showing input values and total. For purposes of this problem version, you should simply print the two input values followed by the calculated total.
If the user entered for number of coins and for coin worth, you would produce the following output:
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
