New course! Every coder should learn Generative AI!
Try a free lesson+ 2
For example:
https://code.sololearn.com/cPCZ16eXiNLU/?ref=app
+ 1
Please, your question is truncated from character limits. But you can get over it, write just the intro in the question title, and write with the details in Description.
Also save the code in your profile, and attach the code link instead of writing the whole code into Description section (eats up space).
People can view your code more conveniently, and you can easily write more in Description than you ever could in the question title.
Good luck! 👍
+ 1
Bigyan Koirala
Thanks for your understanding 👍
Well this is what I came up with;
print('Expenditure & Saving of "A" & "B":\n')
persons = ("A", "B")
for each_person in persons:
income = float(input(f"Enter income for {each_person}: "))
print(income)
expenditure_limit = 0.6 * income
savings = income - expenditure_limit
print(f'{each_person} can spend up to {expenditure_limit} & must save {savings}.\n')