Difference between revisions of "No 1 A"
(Created page with "import math import * a = input('masukkan massa benda 1! ') print(' Massa 1 = ', a) b = input('masukkan massa benda 2! ') print(' Massa 1 = ', b) c = input('masukkan mass...") |
|||
Line 1: | Line 1: | ||
− | + | from math import * | |
− | a = input('masukkan massa benda 1! ') | + | a = eval(input('masukkan massa benda 1! ')) |
print(' Massa 1 = ', a) | print(' Massa 1 = ', a) | ||
− | b = input('masukkan massa benda 2! ') | + | b = eval(input('masukkan massa benda 2! ')) |
print(' Massa 1 = ', b) | print(' Massa 1 = ', b) | ||
− | c = input('masukkan massa benda 3! ') | + | c = eval(input('masukkan massa benda 3! ')) |
print(' Massa 1 = ', c) | print(' Massa 1 = ', c) | ||
− | d = input('masukkan massa benda 4! ') | + | d = eval(input('masukkan massa benda 4! ')) |
print(' Massa 1 = ', d) | print(' Massa 1 = ', d) | ||
− | S = | + | S = eval(input('Masukkan besar sudut! ')) |
print(' besar sudut = ', S) | print(' besar sudut = ', S) | ||
− | g = | + | g = 10 |
− | x = | + | x = sin (S) |
t1 = (a*g*x) | t1 = (a*g*x) | ||
Line 35: | Line 35: | ||
print(' nilai T1 = ', t1) | print(' nilai T1 = ', t1) | ||
− | |||
print(' nilai T2 = ', t2) | print(' nilai T2 = ', t2) | ||
− | |||
print(' nilai T3 = ', t3) | print(' nilai T3 = ', t3) | ||
− | |||
print(' nilai T4 = ', t4) | print(' nilai T4 = ', t4) |
Revision as of 17:47, 23 October 2019
from math import *
a = eval(input('masukkan massa benda 1! '))
print(' Massa 1 = ', a)
b = eval(input('masukkan massa benda 2! '))
print(' Massa 1 = ', b)
c = eval(input('masukkan massa benda 3! '))
print(' Massa 1 = ', c)
d = eval(input('masukkan massa benda 4! '))
print(' Massa 1 = ', d)
S = eval(input('Masukkan besar sudut! '))
print(' besar sudut = ', S)
g = 10
x = sin (S)
t1 = (a*g*x)
t2 = ((a+b)*g*x)
t3 = ((a+b+c)*g*x)
t4 = (d*g*x)
print(' nilai T1 = ', t1) print(' nilai T2 = ', t2) print(' nilai T3 = ', t3) print(' nilai T4 = ', t4)