М
Молодежь
К
Компьютеры-и-электроника
Д
Дом-и-сад
С
Стиль-и-уход-за-собой
П
Праздники-и-традиции
Т
Транспорт
П
Путешествия
С
Семейная-жизнь
Ф
Философия-и-религия
Б
Без категории
М
Мир-работы
Х
Хобби-и-рукоделие
И
Искусство-и-развлечения
В
Взаимоотношения
З
Здоровье
К
Кулинария-и-гостеприимство
Ф
Финансы-и-бизнес
П
Питомцы-и-животные
О
Образование
О
Образование-и-коммуникации
meli12341
meli12341
27.05.2022 06:01 •  Информатика

)
Різними мовами

How many years do you need to put the amount of have in the bank to get the amount of UAH 1,000,000, if the bank has 7% per annum and the state imposes a tax of 19.5% on income

На сколько лет нужно положить сумму have в банк, чтобы получить сумму 1000000 грн, если банк начисляет 7% годовых, а государство накладывает налог 19,5% в доход ​

👇
Ответ:
кэтлин2005
кэтлин2005
27.05.2022

# сложный процент

bank = 7

state = 19.5

years = summ = 0

have = float(input())

while summ <= 1000000:

   years += 1

   summ = have * (1 + bank / 100 * (1 - state / 100)) ** years

print(years)

# простой процент

from math import ceil

bank = 7

state = 19.5

have = float(input())

per = have * bank / 100 * (1 - state / 100)

years = (1000000 - have) / per

print(ceil(years))

Объяснение:

4,7(58 оценок)
Открыть все ответы
Ответ:
masloshick
masloshick
27.05.2022
Romanf romanf отличник 2013-01-10t16: 13: 22+00: 00 1. подумать над алгоритмом 2. вот сам алгоритм: а. спросить у пользователя значения б. расчитать ответ в. выдать ответ на экран 3. написать код в паскале 4. исправить ошибки компиляции 5. протестировать, вводить разные числа 6. обнаружила, что если вводить числа наугад ответ получается отрицательным иногда 7. вставить код проверки введенных пользователем значений 8. убрать ошибки компиляции 9. протестировать 10. готово а вот и сама программа: program aerobus; uses crt; const totalplace = 160; var businessplaces, economyplaces: integer; businessprice, economyprice: real; totalcharge: real; a,b: integer; correctinput: boolean; begin clrscr; businessplaces: =totalplace div 4; economyplaces: = totalplace - businessplaces; writeln('business places count: ', businessplaces); writeln('economy places count: ', economyplaces); correctinput: =false; while not correctinput do begin write('please input business class ticket price: '); readln(businessprice); if(businessprice> 0) then begin correctinput: =true; end else begin writeln('the price should be a positive number, please try again'); end; end; economyprice: =businessprice/2; writeln('economy ticket price is: ', economyprice: 0: 2); correctinput: =false; while not correctinput do begin write('how many business tickets are left? : '); readln(a); if(a> =0) and (a< =businessplaces)then correctinput: =true; if(a< 0) then begin writeln('please input a positive number or 0, please try again'); end; if(a> businessplaces) then begin writeln('please input a number which is less or equal to the tolal business place count, please try again'); end; end; correctinput: =false; while not correctinput do begin write('how many economy tickets are left? : '); readln(b); if(b> =0) and (b< =economyplaces)then correctinput: =true; if(b< 0) then begin writeln('please input a positive number or 0, please try again'); end; if(b> economyplaces) then begin writeln('please input a number which is less or equal to the tolal economy place count, please try again'); end; end; totalcharge: =(businessplaces-a)*businessprice; totalcharge: =totalcharge+(economyplaces-b)*economyprice; writeln('the total charge is: ', totalcharge: 0: 2); writeln; writeln('press enter to exit'); readln; end.
4,6(13 оценок)
Ответ:
Vetaflyy
Vetaflyy
27.05.2022

import tkinter as tk

class Programm(tk.Tk):

   def __init__(self):

       super().__init__()

       self.title("Сумма квадратов")

       self.label1=tk.Label(self,text="Введите кол-во дней:").grid(row=0,column=0)

       self.input=tk.Entry(self)

       self.input.grid(row=0,column=1)

       self.button= tk.Button(self, text="Посчитать", command=self.clicked,width=40).grid(row=1,columnspan=2)

       self.label2=tk.Label(self, text="")

       self.label2.grid(row=2,columnspan=2)

   def clicked(self):

       if self.input.get()=="20":

           txt="22000"

       elif int(self.input.get())<10:

           txt=str(20000*0.4)

       else: txt="20000"

       self.label2["text"]=txt

if __name__ == "__main__":

   app=Programm()

   app.mainloop()

4,8(31 оценок)
Это интересно:
Новые ответы от MOGZ: Информатика
logo
Вход Регистрация
Что ты хочешь узнать?
Спроси Mozg
Открыть лучший ответ