Anda di halaman 1dari 8


Start •

setup program Start

setup program
loop program
loop program

Jika terdapat masalah,


Nyatakan sama ada pin
pastikan setiap baris kod
Kenalpasti pin yang tersebut adalah pin Tuliskan aturcara dalam
mempunyai tanda ; dan
diguna dalam projek INPUT atau OUTPUT di bahagian LOOP
setiap symbol (), {}
bahagian SETUP
mempunyai pasangannya
Start

Turn on LED at Pin 13

Wait 1 second

Turn off LED at Pin13

Wait 1 second

End

 

 

 

TRUE ADAKAH FALSE
SYARAT
BENAR?

A B

PROSES LAIN DALAM


ATUR CARA

x = 56 x = 56.3 x = 56 x = apple
y = 78 y = 56.02 y = 56 y = apple
print(x > y) print(x >= y) print(x == y) print(x != y)

x = 56 x = 19 x = 56 x = apple
y = 78 y = 91 y = 56 y = Apple
print(x is 56) print(x <= y) print(x = y) print(x == y)

x = 56 x = 1 x = 2 x = 91
y = 78 y = apple y = 4 y = 91.2
print(y < x) print(x == y) print(x == (y*2)) print(x = y)

x = 56 x = 1.2 x = 23 x = 0
y = 78 y = 3.2 y = 12 y = 3
print(x is y) print(x != y) print(x != y) print(x < 5)
Start

Read potentiometer
value, x
if (SYARAT){
PERNYATAAN ATUR CARA JIKA BENAR
TRUE } else {
FALSE
Is X< 500 PERNYATAAN ATUR CARA LAIN

On LED at Pin 5 Off LED at Pin 5

End

 

if(sapu lantai && bersih lantai){


Boleh keluar main
}
Sapu lantai Bersih tandas Keluar main
True True
if(set alarm || pesan ibu){
Boleh bangun
}
Set alarm Pesan Ibu Boleh bangun
True True

if(! tidur dalam kelas){


Boleh lulus peperiksaan
} Tidur dalam kelas Lulus peperiksaan
True

X = 25
Y = 25
Z = 50

!(X+Y-Z == 0) && false


X == 5 && X == Y
!(!(X == Y))
X != 5 && X == Y
!(!(X == Y) && X == Y)
 
X != 5 || X == Y 
!((X+Y) == Z)
!(X == Z)
(X+Y) >= X && !(Z == X)

!(X == Z) && (X == Y)

((X==Y) && ((Z-X) == Y)) || !((X+Y) == Z)

Anda mungkin juga menyukai