Difference between revisions of "Tugas After UTS"
Eric Delbert (talk | contribs) |
Eric Delbert (talk | contribs) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== TUGAS AFTER UTS == | == TUGAS AFTER UTS == | ||
+ | |||
+ | '''Muhasabah''' | ||
+ | |||
+ | [[File:Muhasabaeric-1.mp4]] | ||
Berikut adalah video penjelasan untuk case 1 yang ada pada UTS | Berikut adalah video penjelasan untuk case 1 yang ada pada UTS | ||
Line 7: | Line 11: | ||
[[File:Case_1A.mp4]] | [[File:Case_1A.mp4]] | ||
+ | |||
+ | from math import * | ||
+ | |||
+ | g = 9.81 | ||
+ | m1 = int(input("Massa 1: ")) | ||
+ | m2 = int(input("Massa 2: ")) | ||
+ | m3 = int(input("Massa 3: ")) | ||
+ | u_1 = eval(input("u1: ")) | ||
+ | u_2 = eval(input("u2: ")) | ||
+ | u_3 = eval(input("u3: ")) | ||
+ | alpha = eval(input("sudut alpha: ")) | ||
+ | a = eval(input("percepatan: ")) | ||
+ | c = sin (alpha) | ||
+ | d = cos (alpha) | ||
+ | |||
+ | t1 = m1*g*(c-u_1*d) - m1*a | ||
+ | t2 = m2*g*(c-u_2*d) + t1 - m2*a | ||
+ | t3 = m3*g*(c-u_3*d) + t2 - m3*a | ||
+ | |||
+ | print("tegangan total: ",t3) | ||
Cara 2 | Cara 2 | ||
+ | |||
+ | [[File:Casecase.mp4]] | ||
+ | |||
+ | Algoritma 2 | ||
+ | |||
+ | from numpy import * | ||
+ | |||
+ | g = 9.81 #percepatan gravitasi | ||
+ | m1 = eval(input("Massa 1: ")) #untuk menginput nilai m1 | ||
+ | m2 = eval(input("Massa 2: ")) | ||
+ | m3 = eval(input("Massa 3: ")) | ||
+ | u_1 = eval(input("Koef gesek 1: ")) | ||
+ | u_2 = eval(input("Koef gesek 2: ")) | ||
+ | u_3 = eval(input("Koef gesek 3: ")) | ||
+ | a = eval(input("percepatan: ")) #percepatan yang ada dibidang miring | ||
+ | sudutalpha = eval(input("alpha: ")) | ||
+ | alpha = (sudutalpha * 1/180)*pi | ||
+ | c = sin(alpha) | ||
+ | d = cos(alpha) | ||
+ | |||
+ | b1 = m1*g*(c-u_1*d) - m1*a | ||
+ | b2 = m2*g*(c-u_2*d) - m2*a | ||
+ | b3 = m3*g*(c-u_3*d) - m3*a | ||
+ | |||
+ | b = array([b1,b2,b3]) | ||
+ | T = array([[1,0,0], | ||
+ | [-1,1,0], | ||
+ | [0,-1,1]]) | ||
+ | |||
+ | hasil = linalg.solve(T,b) | ||
+ | T1 = hasil[0] | ||
+ | T2 = hasil[1] | ||
+ | T3 = hasil[2] | ||
+ | |||
+ | print(f'Tegangan tali= {T3}') | ||
Berikut adalah video penjelasan untuk case 2 yang ada pada UTS | Berikut adalah video penjelasan untuk case 2 yang ada pada UTS | ||
[[File:Case_1B.mp4]] | [[File:Case_1B.mp4]] | ||
+ | |||
+ | from math import * | ||
+ | from sympy import * | ||
+ | |||
+ | g = 9.81 | ||
+ | rho = 1.2 | ||
+ | |||
+ | cd = float(input("drag coefficient: ")) | ||
+ | area = float(input("luas area: ")) | ||
+ | v1 = float(input("kecepatan akhir: ")) | ||
+ | m = float(input("massa mobil(kg): ")) | ||
+ | u = float(input("koef gesek: ")) | ||
+ | e = float(input("percepatan: ")) | ||
+ | |||
+ | fg = m*g*u | ||
+ | fmobil = m*e | ||
+ | |||
+ | for vo in range (0,v1): | ||
+ | fdrg = (cd*area*rho*vo**2)/2 | ||
+ | atot = (fmobil - (fdrg+fg))/m | ||
+ | t1 = - v1/atot | ||
+ | |||
+ | print("percepatan tot: ", atot) | ||
+ | print("waktu t1: ", t1) | ||
+ | |||
+ | <comments voting="plus" /> |
Latest revision as of 16:21, 30 October 2019
TUGAS AFTER UTS
Muhasabah
Berikut adalah video penjelasan untuk case 1 yang ada pada UTS
Cara 1
from math import *
g = 9.81 m1 = int(input("Massa 1: ")) m2 = int(input("Massa 2: ")) m3 = int(input("Massa 3: ")) u_1 = eval(input("u1: ")) u_2 = eval(input("u2: ")) u_3 = eval(input("u3: ")) alpha = eval(input("sudut alpha: ")) a = eval(input("percepatan: ")) c = sin (alpha) d = cos (alpha)
t1 = m1*g*(c-u_1*d) - m1*a t2 = m2*g*(c-u_2*d) + t1 - m2*a t3 = m3*g*(c-u_3*d) + t2 - m3*a
print("tegangan total: ",t3)
Cara 2
Algoritma 2
from numpy import *
g = 9.81 #percepatan gravitasi m1 = eval(input("Massa 1: ")) #untuk menginput nilai m1 m2 = eval(input("Massa 2: ")) m3 = eval(input("Massa 3: ")) u_1 = eval(input("Koef gesek 1: ")) u_2 = eval(input("Koef gesek 2: ")) u_3 = eval(input("Koef gesek 3: ")) a = eval(input("percepatan: ")) #percepatan yang ada dibidang miring sudutalpha = eval(input("alpha: ")) alpha = (sudutalpha * 1/180)*pi c = sin(alpha) d = cos(alpha)
b1 = m1*g*(c-u_1*d) - m1*a b2 = m2*g*(c-u_2*d) - m2*a b3 = m3*g*(c-u_3*d) - m3*a
b = array([b1,b2,b3]) T = array([[1,0,0], [-1,1,0], [0,-1,1]])
hasil = linalg.solve(T,b) T1 = hasil[0] T2 = hasil[1] T3 = hasil[2]
print(f'Tegangan tali= {T3}')
Berikut adalah video penjelasan untuk case 2 yang ada pada UTS
from math import * from sympy import *
g = 9.81 rho = 1.2
cd = float(input("drag coefficient: ")) area = float(input("luas area: ")) v1 = float(input("kecepatan akhir: ")) m = float(input("massa mobil(kg): ")) u = float(input("koef gesek: ")) e = float(input("percepatan: "))
fg = m*g*u fmobil = m*e
for vo in range (0,v1): fdrg = (cd*area*rho*vo**2)/2 atot = (fmobil - (fdrg+fg))/m t1 = - v1/atot
print("percepatan tot: ", atot) print("waktu t1: ", t1)
Enable comment auto-refresher