Question

In: Computer Science

You will write a monthly financial budget program in Python. INPUT: Monthly income Bills (Rent, Water...

You will write a monthly financial budget program in Python.

INPUT:

  • Monthly income
  • Bills (Rent, Water & Electricity, Internet, Phone, Car Payment, Gas, and other expenses.)

PROCESSING / CALCULATING:

  • Current Balance (the balance left over after subtracting all the bills from the monthly income)

OUTPUT:

-A statement at whether the user will have money left over or not.

-Amount left over.

-Advice if the user has a negative balance

Solutions

Expert Solution

## taking Monthly_income as input
Monthly_income=int(input("Enter Monthly Income:"))
print("Enter your bills individually")
## taking all the bill amounts as inputs from the user
rent=int(input("Enter Rent bill :\t"))
Water_Electricity=int(input("Enter Water & Electricity bill :\t"))
Internet=int(input("Enter Internet bill :\t"))
Phone=int(input("Enter Phone bill :\t"))
CarPayment=int(input("Enter CarPayment bill :\t"))
Gas=int(input("Enter Gas bill :\t"))
other_expenses=int(input("Any other_expenses? :\t"))
## if user enters the negative amount will warn
if rent < 0 or Water_Electricity < 0 or Internet < 0 or Phone < 0 or CarPayment < 0 or Gas < 0 or other_expenses < 0:
print("Please Enter positive numbers only")
else:
## adding all the expenses
tottal_expenses=rent+Water_Electricity+Internet+Phone+CarPayment+Gas+other_expenses
## substracting total expense from monthly income
Current_Balance=Monthly_income-tottal_expenses
## printing the statement
print("After payment of all the bills","[",tottal_expenses,"]", "from your monthly income",Monthly_income,
",Amount left over is :\t",Current_Balance)
## warning message to the user
if Current_Balance < 0:
print("Better control over your money")
  

SOLUTION SCREEN

OUTPUT SCREEN


Related Solutions

In Python write a program that calculates and prints out bills of the city water company....
In Python write a program that calculates and prints out bills of the city water company. The water rates vary, depending on whether the bill is for home use, commercial use, or industrial use. A code of r means residential use, a code of c means commercial use, and a code of i means industrial use. Any other code should be treated as an error. The water rates are computed as follows:Three types of customers and their billing rates: Code...
PYTHON Write a python program that encrypts and decrypts the user input. Note – Your input...
PYTHON Write a python program that encrypts and decrypts the user input. Note – Your input should be only lowercase characters with no spaces. Your program should have a secret distance given by the user that will be used for encryption/decryption. Each character of the user’s input should be offset by the distance value given by the user For Encryption Process: Take the string and reverse the string. Encrypt the reverse string with each character replaced with distance value (x)...
Write a program in python that corrects misspelled words. The input for the program is either...
Write a program in python that corrects misspelled words. The input for the program is either a string or a list of strings. The output should be a string or a list depending on the input and should have the spellings corrected. The speller should be able to correct at least the words listed below. You are free to use any data structures we have covered so far including lists and dictionaries. Your program should be in autocorrect.py. Here is...
Write a Python program called “exam.py”. The input file, “input.txt”, is given to you in the...
Write a Python program called “exam.py”. The input file, “input.txt”, is given to you in the Canvas exam instructions. Name your output file “output.txt”. Ensure the program consists of a main function and at least one other function. Ensure the program will read the input file, and will output the following information to the output file as well as printing it to the screen: output the text of the file to screen output the number of words in the file...
IN PYTHON Write a program that takes in a positive integer as input, and outputs a...
IN PYTHON Write a program that takes in a positive integer as input, and outputs a string of 1's and 0's representing the integer in binary. For an integer x, the algorithm is: As long as x is greater than 0 Output x % 2 (remainder is either 0 or 1) x = x // 2 Note: The above algorithm outputs the 0's and 1's in reverse order. You will need to write a second function to reverse the string....
write a python program, please. Create a program that uses the Gettysburg Address as input and...
write a python program, please. Create a program that uses the Gettysburg Address as input and outputs a list of tuples for every two words. For example: [('Four', 'score'),('and', 'seven'), ...].
In this assignment, you are going to write a Python program to demonstrate the IPO (Input-Process-Output)...
In this assignment, you are going to write a Python program to demonstrate the IPO (Input-Process-Output) cycle that is the heart of many imperative programs used for processing large amount of data. Daisy is recently hired by a warehouse. One of her job is to keep track the items ordered by all the branches of the company. The company wants to automate the task using a computer program. Being a friend of Daisy, she knows you are a Computer Science...
In Python write a program that asks the user to enter the monthly costs for the...
In Python write a program that asks the user to enter the monthly costs for the following expenses incurred from operating his or her automobile: loan payment, insurance, gas, oil, tires, and maintenance the program should then display the total monthly cost of these expenses, and the total annual cost of these expenses. your program MUST have BOTH a main function AND a function named calcExpenses to calculate the expenses. DO NOT display the expenses inside of the calcExpenses function!!...
In python, write a program that asked the user to enter the monthly costs for the...
In python, write a program that asked the user to enter the monthly costs for the following expenses incurred from operating his automobile: loan payment, insurance, gas, oil, tires, and maintenance. The program should display total monthly cost and annual cost. Also, should contain main and calcExpenses functions, calcExpenses should only calculate the expenses and everything else should happen in the main function.
Python Program Write a program that will ask a user on how many input colored balls...
Python Program Write a program that will ask a user on how many input colored balls of the following codes: R-red, B-blue, W-white, G-green and O-orange -will he or she would like to enter in the program and print the total number of Red balls were encountered. Assume an uppercase and lower case letter will be accepted.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT