Algoritma UTS
Revision as of 20:27, 28 October 2019 by Khairun.naziri (talk | contribs)
Algoritmanya
1. from math import * g = 9.81
m1 = int(input("Massa benda 1: "))
m2 = int(input("Massa benda 2: "))
m3 = int(input("Massa benda 3: "))
k_g1 = eval(input("Koefisien gesek1: "))
k_g2 = eval(input("koefisien gesek2: "))
k_g3 = eval(input("Koefisien gesek3: "))
kemiringan = eval(input("sudut kemiringan: "))
a = eval(input("percepatan: "))
x = sin (kemiringan)
y = cos (kemiringan)
t1 = m1*g*(x-k_g1*y) - m1*a
t2 = m2*g*(x-k_g2*y) + t1 - m2*a
t3 = m3*g*(x-k_g3*y) + t2 - m3*a
print("tegangan total: ",t3)