Difference between revisions of "UTS Eric Delbert"
Eric Delbert (talk | contribs) (Created page with "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: ")...") |
Eric Delbert (talk | contribs) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Nomor 1 | Nomor 1 | ||
− | from math import * | + | from math import * |
− | g = 9.81 | + | g = 9.81 |
− | m1 = int(input("Massa 1: ")) | + | m1 = int(input("Massa 1: ")) |
− | m2 = int(input("Massa 2: ")) | + | m2 = int(input("Massa 2: ")) |
− | m3 = int(input("Massa 3: ")) | + | m3 = int(input("Massa 3: ")) |
− | u_1 = eval(input("u1: ")) | + | u_1 = eval(input("u1: ")) |
− | u_2 = eval(input("u2: ")) | + | u_2 = eval(input("u2: ")) |
− | u_3 = eval(input("u3: ")) | + | u_3 = eval(input("u3: ")) |
− | alpha = eval(input("sudut alpha: ")) | + | alpha = eval(input("sudut alpha: ")) |
− | a = eval(input("percepatan: ")) | + | a = eval(input("percepatan: ")) |
− | c = sin (alpha) | + | c = sin (alpha) |
− | d = cos (alpha) | + | d = cos (alpha) |
− | t1 = m1*g*(c-u_1*d) - m1*a | + | t1 = m1*g*(c-u_1*d) - m1*a |
− | t2 = m2*g*(c-u_2*d) + t1 - m2*a | + | t2 = m2*g*(c-u_2*d) + t1 - m2*a |
− | t3 = m3*g*(c-u_3*d) + t2 - m3*a | + | t3 = m3*g*(c-u_3*d) + t2 - m3*a |
− | print("tegangan total: ",t3) | + | print("tegangan total: ",t3) |
+ | |||
+ | [[File:Uts_hasil_1.png]] | ||
Nomor 2 | 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) | ||
+ | |||
+ | [[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)