Aug-20-2020, 09:25 AM
Hello. I am learning Python using pythontutor.ru website. There a task where i must write a program about bank deposit and it's profit 1 year later. I wrote a code, it gives right answer to all examples except 1. What can i do to make it right?
My code:
Wrong answer: https://i.postimg.cc/pV1jxKYD/image.png
Link to a task: https://pythontutor.ru/lessons/int_and_f.../percents/
Thanks for reading.
My code:
1 2 3 4 5 6 7 |
p = int ( input ()) x = int ( input ()) y = int ( input ()) kopeiki = ((p / 100 ) + 1 ) * ((x * 100 ) + y) answer_rubles = (kopeiki / / 100 ) answer_kopeiki = int (kopeiki % 100 ) print (answer_rubles, answer_kopeiki) |
Link to a task: https://pythontutor.ru/lessons/int_and_f.../percents/
Thanks for reading.