Sie sind auf Seite 1von 7

Kelompok 5

Name : Luni Karlina Manik (4182121021)


Class : Bilingual Physics Education

SEQUENTIAL LOGIC

1 FORCE FORMULA

%formula f=w/s

clc;

%input

w=input('work=');

s=input('space=');

%process

f= w/s

%output

output

work=12

space=6

f= 2

f= 2

2. SPRING FORMULA
%formula k= f/x

clc;

%input
f=input('force=');

x=input('extention=');

%process

k= f/x

%output

OUTPUT

force=40

extention=20

k= 2

k= 2

3. VELOCITY

%formula v=s/t

clc;

%input

s=input('space=');

t=input('time=');

%process

v=s/t;

end

%output

OUTPUT

space=30
time=10

v= 3

4. POWER

%formula p=w/t

clc;

%input

w=input('work=');

t=input('time=');

%process

p=w/t;

%output

OUTPUT

work=40

time=20

p 2

5. DENCITY

%formula p=f/a

%input

f= input('force=');

a=input('area=');

%process

p=f/a

%output
P

OUTPUT

force=20

area=10

p= 2

p= 2

6. SPEED OF LIGHT

%formula c=q/v

clc;

%input

q= input('electricity charge=');

v=input('velocity=');

%process

c=q/v

%output

OUTPUT

electricity charge=50

velocity=25

c= 2

c =2

7. REFRACTION

%formula n=c/v

clc;
%input

c= input('speed of light in vacuum=');

v=input ('speed of light in other medium=');

%process

n=c/v

%output

OUTPUT

speed of light in vacuum=60

speed of light in other medium=20

n =3

n =3

8. CURRENT

%formula q=i/t

clc;

%input

i= input('current=');

t=input ('time=');

%process

q=i/t

%output

OUTPUT
current=16

time=8

q =2

q =2

9. PRESSURE

%formula p=f/a

%input

f= input('force=');

a=input('area=');

%process

p=f/a

%output

OUTPUT

current=16

time=8

q=

q=
2

force=70

area=3

p = 23.3333

p = 23.3333

10. OHM’S LAW

%formula i=v/r

clc;

%input

v=input('voltage=');

r=input('resistance=');

%process

i=v/r;

%output

OUTPUT

voltage=20

resistance=2

i = 10

Das könnte Ihnen auch gefallen