Difference between revisions of "Algoritma untuk Soal UTS"
(Created page with "Soal no 1 tentang kesetimbangan statis from math import * g = 9.81 m1 = eval(input('Massa benda 1 : ')) m2 = eval(input('Massa benda 2 : ')) m3 = eval(input('Massa benda...") |
|||
Line 10: | Line 10: | ||
d = eval(input('Koefisien gesek : ')) | d = eval(input('Koefisien gesek : ')) | ||
m4 = -((m1+m2+m3)*c*(1-(d*b))) | m4 = -((m1+m2+m3)*c*(1-(d*b))) | ||
− | print('Maka Massa benda 4 adalah ', m4) | + | print('Maka Massa benda 4 adalah ', m4, ' kg') |
Revision as of 17:51, 23 October 2019
Soal no 1 tentang kesetimbangan statis
from math import * g = 9.81 m1 = eval(input('Massa benda 1 : ')) m2 = eval(input('Massa benda 2 : ')) m3 = eval(input('Massa benda 3 : ')) a = eval(input('Sudut miring : ')) b = cos(a) c = sin(a) d = eval(input('Koefisien gesek : ')) m4 = -((m1+m2+m3)*c*(1-(d*b))) print('Maka Massa benda 4 adalah ', m4, ' kg')
Soal no 2 tentang kesetimbangan dinamis
from math import * g = 9.81 p = 1.2 cd = eval(input('Drag Coefficient : ')) luas = eval(input('Luas: ')) v = eval(input('Kecepatan : ')) m = eval(input('Massa : ')) c = eval(input('Koefisien gesekan: ')) a = eval(input('Percepatan : ')) v1 = eval (input('Kecepatan maksimum : ')) fa = g*c fc = (cd*luas*p*v**2)/2*m f1 = a dd = f1 - (fc+fa) t=(v1-v)/dd print('Waktu :', t, ' s')