Ответ:
Python
a, m, n, d = map (int, input().split(' '))
sm=0
for i in range (1,4):
sm+=i+m
pr=1
pr*=i+d
print('y=', n*(a/pr+sm/m))
----------результат-------------------------
1 2 3 4
y= 18.014285714285712
>>>
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
Python
a, m, n, d = map (int, input().split(' '))
sm=0
for i in range (1,4):
sm+=i+m
pr=1
for i in range (1,4):
pr*=i+d
print('y=', n*(a/pr+sm/m))
----------результат-------------------------
1 2 3 4
y= 18.014285714285712
>>>
Label(root, width=15, text=" a =",font="Times 14").grid(row=1, column=5, sticky=W)
Label(root, width=15, text=" d =",font="Times 14").grid(row=2, column=5, sticky=W)
Label(root, width=15, text=" m =",font="Times 14").grid(row=3, column=5, sticky=W)
EntryA = Entry(root, width=15, font="Times 14")
EntryD = Entry(root, width=15, font="Times 14")
EntryM = Entry(root, width=15, font="Times 14")
EntryS = Entry(root, width=33, font="Times 14")
EntryA.grid(row=1, column=6, sticky=E)
EntryD.grid(row=2, column=6, sticky=E)
EntryM.grid(row=3, column=6, sticky=E)
EntryS.grid(row=4, columnspan=8)
but = Button(root, text="Вывести сумму", width=20, font="Times 10", command=summa)
but.grid(row=4, column=9, sticky=E)
root.mainloop()