Question
I need this done in Python 3.8
Objectives: • To be able to read data from standard input • To be able to write data to standard output • To understand simpl
0 0
Add a comment Improve this question Transcribed image text
Answer #1

#PROBLEM 1

cycling=(int)(input("Enter number of hours cycling: "))
running=(int)(input("Enter number of hours running: "))
swimming=(int)(input("Enter number of hours swimming: "))
total=cycling*200+running*475+swimming*275
total=total/3500
print("Weight loss: ",total," pounds")


#PROBLEM 2

import math as m
future= (int)(input("Enter future value :"))
interest=(int)(input("Enter interest rate (as %) :"))
years=(int)(input("Enter number of years :"))

divisor=m.pow((1+interest/100),years)
present=future/divisor
print("Present value : $"+"{:.2f}".format(present))

Help I EX C:WSOSLANSHUMAN GAURAV Destop Spyder (Python 3.7) File Edit Search Source Run Debug Consoles Projects Tools View E@

Add a comment
Know the answer?
Add Answer to:
I need this done in Python 3.8 Objectives: • To be able to read data from...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Using the Metabolic Equivalent of Task value for a given activity, the number of calories burned...

    Using the Metabolic Equivalent of Task value for a given activity, the number of calories burned per hour can be calculated. The formula is a person’s weight in pounds divided by 2.2 and multiplied by the MET value for the given activity. Write a program to input the MET value and out put the number of calories burned per hour for a person for each pound between 120 and 190 inclusive. The sample output is for the cycling MET which...

  • Write a program in Python that computes the interest accrued on an account. You can modify...

    Write a program in Python that computes the interest accrued on an account. You can modify the “futval.py” program given in Chapter 2 to accomplish it. Your program should use a counted loop rather than a formula. It should prompt the user to enter the principal amount, the yearly interest rate as a decimal number, the number of compounding periods in a year, and the duration. It should display the principal value at the end of the duration. To compute...

  • This is done in c programming and i have the code for the programs that it wants at the bottom i ...

    This is done in c programming and i have the code for the programs that it wants at the bottom i jut dont know how to call the functions Program 2:Tip,Tax,Total int main(void) {    // Constant and Variable Declarations    double costTotal= 0;    double taxTotal = 0;    double totalBill = 0;    double tipPercent = 0;    // *** Your program goes here ***    printf("Enter amount of the bill: $");    scanf("%lf", &costTotal);    printf("\n");    // *** processing ***    taxTotal = 0.07 * costTotal;    totalBill...

  • Write them in python IDLE ***** 5. Average Rainfall Write a program that uses nested loops...

    Write them in python IDLE ***** 5. Average Rainfall Write a program that uses nested loops to collect data and calculate the average rainfall over a period of years. The program should first ask for the number of years. The outer loop will iterate once for each year. The inner loop will iterate twelve times, once for each month. Each iteration of the inner loop will ask the user for the inches of rainfall for that month. After all iterations,...

  • I need help with this code: Write a program that calculates the future value of an...

    I need help with this code: Write a program that calculates the future value of an investment at a given interest rate for a specified number of years. The formula for the calculation is as follows: futureValue = investmentAmount * (1 + monthlyInterestRate)years*12 Use text fields for interest rate, investment amount, and years. Display the future amount in a text field when the user clicks the Calculate button, as shown in the following figure. It needs to be done in...

  • Write a code using loop and flag function in python jupitior notebook: Ask the user for...

    Write a code using loop and flag function in python jupitior notebook: Ask the user for the number of items they bought. Also ask the price of each item they bought and quantity purchased. Display the total amount they owe. Ask the user for a number n. Calculate 1+2+3+….+n. Ask the user for a number n. Calculate 1*2*3*…*n. Ask the user for number of rows (r) and columns (c). Print * for r rows and c columns. Ask the user...

  • The work is done. I just need my answers checked that are highlighted in yellow. Thank...

    The work is done. I just need my answers checked that are highlighted in yellow. Thank you. Question 3 Marti's coin collection contains fifty 1937 silver dollars. Her grandparents purchased them at their face value (550) in 1937. These coins have appreciated by 8.2 percent annually. How much will the collection be worth in 2020? Present value 50.00 Years 83.00 Interest rate 8.20% Future value $34,660.33 Question 4 Five years ago, you invested $1,800. Today it is worth $2,215. What...

  • I need to write a paint job estimator program in python. I have most of it...

    I need to write a paint job estimator program in python. I have most of it down but i keep getting errors and I dont know how to fix it or what im doing worng specs: A painting company has determined that for every 350 square feet of wall space, one gallon of paint and six hours of labor are required. The company charges $62.25 per hour for labor. Write a program call paintjobestimator.py that asks the user to enter...

  • Hi, I need help with this. Thank you Present value of an ordinary annuity. Fill in...

    Hi, I need help with this. Thank you Present value of an ordinary annuity. Fill in the missing present values in the following table for an ordinary annuity: :: Number of Annual Future Value Annuity Present Value Payments or Interest Rate Years 5 L 10% 0 $172.88 $ (Round to the nearest cent.) i Data Table (Click on the following icon in order to copy its contents into a spreadsheet.) Number of Payments or Years Annual Interest Rate Future Value...

  • Please solve these i. You deposit $6000 in an account earning 2% interest compounded monthly. How...

    Please solve these i. You deposit $6000 in an account earning 2% interest compounded monthly. How much will you have in the account in 10 years? ii. Find the time required for an investment of 5000 dollars to grow to 7900 dollars at an interest rate of 7.5 percent per year, compounded quarterly. Round your answer to two decimal places Your answer is t= iii. You currently have $2,800 (Present Value) in an account that has an interest rate of...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT