Question

using python: Use input to prompt for these float values: beginning balance monthly deposits monthly withdrawals...

using python:

Use input to prompt for these float values:

  • beginning balance
  • monthly deposits
  • monthly withdrawals

Using the assignment operators += and -=, calculate:

  • ending balance

Note: failure to use assignment operators results in 2 point loss

Display results as

Ending balance is {ending balance}.
where value in {} is the calculated values

Tests

Input

Output

Begin Balance

Deposits

Withdrawals

1000

100

50

ending balance is 1050

530.56

99.59

50

ending balance is 580.15

Be sure to separate input from calculation from output

0 0
Add a comment Improve this question Transcribed image text
Answer #1

If you have any doubts please comment below. Please give upvote if you like this.

Python Code:

#prompt and Reading input begining balance from user
Begin_bal = float(input("Enter begining balance :"))
#prompt and Reading input monthly deposits from user
month_depo = float(input("Enter monnthly deposit balance :"))
#prompt and Reading input monthly withdrawls from user
month_withd = float(input("Enter monnthly withdrawls :"))
# Instalize ending balance is 0
ending_bal = 0
# ADD begining balance to ending balance
ending_bal +=Begin_bal
# ADD monthly deposit to ending balance
ending_bal += month_depo
# Subtract monthly withdrawl from ending balance
ending_bal -= month_withd
#Display the ending balance
print("Ending balance is",ending_bal)

Add a comment
Know the answer?
Add Answer to:
using python: Use input to prompt for these float values: beginning balance monthly deposits monthly withdrawals...
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
  • Write this program using python. In your program, when you prompt users for values, only prompt...

    Write this program using python. In your program, when you prompt users for values, only prompt them to enter one value at a time. Here is a sample of what your program should look like. Sample Program Run (User input in bold) What is the length of the room (in feet)? 50 What is the width of the room (in feet)? 30 What is the length of the table (in feet)? 8 What is the width of the table (in...

  • PYTHON:please display code in python Part 1: Determining the Values for a Sine Function Write a...

    PYTHON:please display code in python Part 1: Determining the Values for a Sine Function Write a Python program that displays and describes the equation for plotting the sine function, then prompts the user for the values A, B, C and D to be used in the calculation. Your program should then compute and display the values for Amplitude, Range, Frequency, Phase and Offset. Example input/output for part 1: Part 2: Displaying a Vertical Plot Header A vertical plot of the...

  • In Python. Complete the following programs. Begin each program with a comment that includes: • Your...

    In Python. Complete the following programs. Begin each program with a comment that includes: • Your name • The project/program • Brief description of the problem Lab3Pro1 A supervisor in a manufacturing company wishes to display the bonus amount for an employee based on this year's production. Input Output Processing Distribute bonuses as follows: Display the results as follows: Prompt for user input "Enter number of Units produced" Store the amount entered Bonus This year's production bonus will be $nnnnn...

  • using python Instructions You will be given the name of a city followed by a set...

    using python Instructions You will be given the name of a city followed by a set of integers representing the monthly rainfall (in millimeters) that have happened in a given area over the past year. You will then calculate the average (mean) rainfall for the year. The mean is calculated by dividing the sum of the values in the set by the number of elements in the set mean of a set = sum of all elements number of elements...

  • Need to use Python string formatting to align wind-chill values in equal-sized columns Using your knowledge...

    Need to use Python string formatting to align wind-chill values in equal-sized columns Using your knowledge of loops and other Python features covered so far, write a program that prints a table of windchill values, where: Rows represent wind speed for O to 50 in 5 mph increments Columns represent temperatures from -20 to +60 in 10-degree increments Your program should include a function that returns windchill for a given combination of wind speed & temperature, using this formula from...

  • C++ requirements All values must be read in as type double and all calculations need to...

    C++ requirements All values must be read in as type double and all calculations need to be done using type double. For part 2 you MUST have at least 4 functions, including main. The main function will be the driver of the program. It needs to either do the processing or delegate the work to other functions. Failure to follow the C++ requirements could reduce the points received from passing the tests. General overview This program will convert a set...

  • Write in C++ using emacs. Write a program that calculates the ending balance of several savings...

    Write in C++ using emacs. Write a program that calculates the ending balance of several savings accounts. The program reads information about different customers’ accounts from an input file, “accounts.txt”. Each row in the file contains account information for one customer. This includes: the account number, account type (premium, choice, or basic account), starting balance, total amount deposited, and total amount withdrawn. Your program should: - open the file and check for successful open, - then calculate the ending balance...

  • OpenSooq Assignment - Software Engineer Given two strings input of printable text, a and b ....

    OpenSooq Assignment - Software Engineer Given two strings input of printable text, a and b . let the edit distance between a and b is least number of operations needed to transform a to b, write php code that calculate edit distance using: 1. hamming distance that only have substitute operations (ex. substitute letter X with letter Y). 2. Levenshtein distance: that have 3 possible operators: insert, delete or substitution operations the function should consider all possibilities but should not...

  • python Topics covered: Using variables e Arithmetic operators Printing output Manipulating string objects . Generating random...

    python Topics covered: Using variables e Arithmetic operators Printing output Manipulating string objects . Generating random numbers . Getting user input NOTE: Each of your files must include a docstring at the top of the file containing your name, username, ID number and a description of the program. When solving these questions you must only use content covered in lectures 1 to 6 Submit the files containing your exercises using the Assignment Dropbox https:/adb auckland.ac.nz/Homel QUESTION 1 (3 MARKS) A...

  • Assignment Overview This assignment will give you more experience on the use of strings and iterations....

    Assignment Overview This assignment will give you more experience on the use of strings and iterations. The goal of this project is to use Google’s currency converter API to convert currencies in Python and display the result to user by processing the returned results. Assignment Background The acronym API stands for “Application Programming Interface”. It is usually a series of functions, methods or classes that supports the interaction of the programmer (the application developer, i.e., you) with some particular program....

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