In: Computer Science
You will write a monthly financial budget program in Python.
INPUT:
PROCESSING / CALCULATING:
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
## 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