Soal A UTS
from math import*
g = 9.8
m1 = int(input("Massa benda 1(kg): "))
m2 = int(input("Massa benda 2(kg): "))
m3 = int(input("Massa benda 3(kg): "))
KoefG1 = eval(input("Koefisien gesek1: "))
KoefG2 = eval(input("Koefisien gesek2: "))
KoefG3 = eval(input("Koefisien gesek3: "))
alpa = eval(input("sudut alpa: "))
a = eval(input("percepatan: "))
q = sin (alpa)
w = cos (alpa)
t1 = m1*g*(q-KoefG1*w) - m1*a
t2 = m2*g*(q-KoefG2*w) + t1 - m2*a
t3 = m3*g*(q-KoefG3*w) + t2 - m3*a
print("tegangan tali 1: ",t1)
print("tegangan tali 2: ",t2)
print("tegangan tali 3: ",t3)
print("total tegangan tali : ",t1+t2+t3)
Enable comment auto-refresher