+ 1
Math question
I want to ask of my Formular's right in a Programm (Sry I know that's Not programming but don't know where to ask) I have the values Saving: The Money you currently have. Salary: Money you get per hour (Work) Hours: Work hours Days: Work days per week Discount: Discount amount(Prozentual) Price: Price of a spezific Item Restmoney: Money you Wish to have left after a month with Buying the Item. Current Formular: (Saving+Salary*Hours*(30 - (30/7) * (7 - days))) * (1 - Discount/100) - Price) >= Restmoney
3 Answers
+ 2
Felix Alcor
I was assuming the monthly income was a gross income, which would incur tax thus returning your net monthly income.
But I am glad that you have achieved a suitable formula
+ 1
Felix Alcor
I got this formula for you
savings = int(input) # existing
wage = int(input()) # /hr
hours = int(input()) # /day
days = int(input()) # /month
tax = int(input()) # Prozentual
price = int(input()) # the item
wanted = int(input()) # Restmoney
formula = (savings + ((wage*hours*days*)*((100-tax)*.01)) - price) >= wanted
print(wanted)
+ 1
Thanks Rik Wittkopp . Tho we both have some flaws there. First the Input's how many days a week you Work also example 5 from 7 days a week.
I think we should better take:
Formular = (Saving + wage*hours*((30/7)*days)) - (price*(1+(Discount/100)) >= restmoney
Thank you somehow only after Reading your answer did I notice that a "discount" belongs to a price. đ