Difference between revisions of "UTS Eric Delbert"
Eric Delbert (talk | contribs) |
Eric Delbert (talk | contribs) |
||
Line 20: | Line 20: | ||
print("tegangan total: ",t3) | print("tegangan total: ",t3) | ||
+ | |||
+ | [[File:Uts_hasil_1.png]] | ||
Nomor 2 | Nomor 2 | ||
Line 45: | Line 47: | ||
print("percepatan tot: ", atot) | print("percepatan tot: ", atot) | ||
print("waktu t1: ", t1) | print("waktu t1: ", t1) | ||
+ | |||
+ | [[File:Uts_hasil_2.png]] |
Latest revision as of 01:55, 24 October 2019
Nomor 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)
Nomor 2
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)