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) |
||
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) |
Nomor 2 | Nomor 2 |
Revision as of 01:31, 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