如何解决如何制作数据表来跟踪收入和储蓄?
我刚刚完成了我的预算,它告诉我是否包括扣除额(根据是收入还是赠金)。我想添加一种方法来输入日期并开始计算和绘制我节省的金额。我知道这是一个广泛的问题,我不要求完整的答案。只要指向正确的方向就很棒。
这是我的代码:
import numpy as np
string = "WORKING BUDGET TEMPLATE"
print(string.center(50,'-'))
print("Enter amount: $")
income = int(input())
def printAmount(variable):
print("Save long term: \n$"+ str(round((variable * 0.3),2)))
print("Save short term: \n$" + str(round((variable * 0.3),2)))
print("Spending money: \n$" + str(round((variable * 0.4),2)))
paymentType = input("Is this amount from a paycheck? (Y/N) \n")
if paymentType == "Y":
real_income = income-(280+income*0.12)
print("""Deductions:
Phone: -$30
Truck: -$250
Income Tax: -12%
Real income: $""" + str(round(real_income,2)))
printAmount(real_income)
else:
printAmount(income)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。