Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
1st Oct 2019, 4:10 PM
Bilbo Baggins
Bilbo Baggins - avatar
+ 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! 👍
1st Oct 2019, 3:22 PM
Ipang
+ 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')
2nd Oct 2019, 10:15 AM
Ipang