wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Pretest Pemrograman

Total questions: 50

Worksheet time: 1hrs 15mins

Name
Class
Date
1.

tag html untuk membuat garis horizontal

(a)  

2.

tag html untuk membuat posisi teks

a)

bgcolor="red"

b)

align="center"

c)

<center>

d)

<merge>

3.

tag html yang benar untuk tabel adalah?

a)

</table><table>

b)

<tabel></tabel>

c)

<table></table>

d)

</tabel><tabel>

4.

table header

a)

<tb>

b)

<td>

c)

<tr>

d)

<th>

5.

membuat baris

a)

<tb>

b)

<td>

c)

<tr>

d)

<th>

6.

tag html untuk menulis data dalam tabel

(a)  

7.

membuat jarak antara dinding sel dan sel

a)

cellpading

b)

cellspacing

8.

membuat jarak antara sel dan sel

a)

cellpading

b)

cellspacing

9.

cara menulis atribut cellpadding yang benar adalah

a)

<cellpading=10>

b)

<cellpading="10">

c)

<=cellpadding"10">

d)

<"10" cellpading>

10.

apa fungsi tag <border="1">

(a)  

11.

sets the color of words in a paragraph

a)

h1 {

color: pink;

}

b)

img {

color: pink;

}

c)

body {

color: pink;

}

d)

p {

color: pink;

}

12.

This is a picture of a ____.

a)

CSS Rule

b)

HTML Rule

c)

Tags

d)

Coding

13.

The blue is called an _____________

a)

Declaration

b)

Selector

c)

Property

d)

Value

14.

The blue is called an _____________

a)

Declaration

b)

Selector

c)

Property

d)

Value

15.

The blue is called an _____________

a)

Declaration

b)

Selector

c)

Property

d)

Value

16.

The blue is called an _____________

a)

Declaration

b)

Selector

c)

Property

d)

Value

17.

What color will this element be?

a)

Green

b)

Blue

c)

Red

d)

No color

18.

Looking at the picture below, based on those 3 important rules to remember, what will the color of the text be?

a)

Red

b)

Blue

c)

No color

d)

White

19.

The color this element will be________

a)

Blue

b)

Red

c)

green

d)

No color

20.

CSS is the...

a)

language for designing web pages

b)

longitudinal compass for directions

c)

way we send information to each computer

d)

way we set up each tag

21.

What symbol should you use to target an id in css?

a)

.

b)

+

c)

id

d)

#

22.

What symbol should you use to target a class name in css?

a)

#

b)

()

c)

.

d)

class

23.

What is the correct syntax to change the background color with css?

a)

background-color: purple;

b)

background-color = "purple";

c)

backgroundcolor=orange

d)

change-background-color: purple

24.

TRUE OR FALSE: HTML is used to style web pages.

a)

True

b)

False

25.

TRUE OR FALSE: CSS is used to style web pages

a)

True

b)

False

26.

How do you change the font color with CSS?

a)

font-color: green;

b)

color: green;

c)

change-font-color: green;

d)

fontcolor=green;

27.

Which of the following is the correct CSS link tag?

a)

<link rel="styles" href="stylesheet.css">

b)

<link href="stylesheet">

c)

<link rel="stylesheet" src="styles.css">

d)

<link rel="stylesheet" href="styles.css">

28.
What does CSS stand for? 
a)
Creative Style Sheets
b)
Cascading Style Sheets
c)
Colorful Style Spread
d)
Computer Style Spread
29.
Which is correct CSS syntax? 
a)
{ body; color=black;}
b)
body: color= black
c)
body {color:black;}
d)
(body color is black) 
30.
Which is the selector in this CSS?
p {color: red;}
a)
p
b)
color
c)
red
31.

Choose which one is true!

a)

num1 = 30

num2 = 9

division = num1 / num2

print("The result of " + str(num1) + " / " + str(num2) + " = " + str(Division))

b)

num1 = 30

num2 = 9

division = num1 / num2

print("The result of " + str(num1) + " / " + str(num2) + " = " + int(division))

c)

num1 = 30

num2 = 9

division = num1 / num2

print("The result of " + str(num1) + " / " + str(num2) + " = " + str(division))

d)

num1 = 30

num2 = 9

division = num1 / num2

print("The result of " + int(num1) + " / " + int(num2) + " = " + str(division))

32.

Check which statements are true!

1.Assignment operator 🡆 += (added by) can be use to make an increment of a variable.

2.Comparison operator 🡆 == (equal) can be used to set a variable value, not only to compare between variable and the value.

3.Logical operator 🡆 or is to set between two conditions that returns true if one of them is true.

4.""" Comments are also good to show other developer what you are doing with your code. For example: """

a)

1, 2, 3

b)

1, 3, 4

c)

1, 2, 4

d)

1, 2, 3, 4

33.

How to write an input and output command in Phyton text editor that will result like below? The variable input is name.


Please enter your name:

Hi, Aan

a)

name = input(Please enter your name:)

print("Hi, "+name)

b)

name = (int(input("Please enter your name:"))

print("Hi, "+name)

c)

name = input("Please enter your name:")

print("Hi, "+str(name))

d)

name = input(Please enter your name:)

print("Hi, "+name)

34.

What is missing from this function?

def odd_even_checker(num):

if num < 1

print("The number is less than 1 :(")

elif num > 100

print("The number is more than 100 :(")

else:

if num%2 == 0

print("The number is even!")

else

print("The number is odd!")

a)

:

b)

and

c)

;

d)

{}

35.

What is the result of this code?

colors = ["Red" ,"Blue" ,"Yellow" ,"Red"]

print("Name of colors are as follow:")

for color in colors:

print(color)

a)

Name of colors are as follow:

Red

Blue

Yellow

Red

b)

Name of colors are as follow:Red, Blue, Yellow, Red

c)

Name of colors are as follow:"Red""Blue""Yellow""Red"

d)

Name of colors are as follow:RedBlueYellowRed

36.

Serial.print(namasensor) digunakan untuk ?

(a)  

37.

void loop() {

digitalWrite(pin, HIGH);

delay(1000);

digitalWrite(pin, LOW);

delay(1000);

}


Pada pernyataan di ata program akan berjalan secara...

(a)  

38.

int (integer) dapat menyimpan data sebesar .... bytes

a)

2 bytes

b)

4 bytes

c)

6 bytes

d)

3 bytes

e)

5 bytes

39.

Perhatikan potongan program berikut ini !!


// check a sensor every 10 times through a loop

void loop()

{

i++;

if ((i % 10) == 0) { // read sensor every ten times through loop

x = analogRead(sensPin);

}

/ ...

}


// setup a buffer that averages the last five samples of a sensor

int senVal[5]; // create an array for sensor data

int i, j; // counter variables

long average; // variable to store average

...


void loop() {

// input sensor data into oldest memory slot

sensVal[(i++) % 5] = analogRead(sensPin);

average = 0;

for (j=0; j<5; j++) {

average += sensVal[j]; // add up the samples

}

average = average / 5; // divide by total


// send the analog input information (0 - 1023) Serial.print(value % 128, BYTE); // send lowest 7 bits Serial.print(value >> 7, BYTE); // send highest three bits


UNTUK OPERASI MATEMATIKA APAKAH POTONGAN PROGRAM DI ATAS ?

a)

perkalian

b)

pembagian

c)

sisa hasil bagi

d)

pengurangan

e)

perpangkatan

40.

Bilangan konstan pada arduino digunakan untuk (a)  

41.

Apakah perbedaan dari syntax delay dan milis pada arduino?

a)

satuan waktu yang digunakan

b)

perhitungan nilai second

c)

penggunaan variabel

d)

lamanya waktu jeda program

e)

penulisan struktur program

42.

Dari simbol boolean dibawah ini, manakah yang digunakan untuk operasi logika OR ?

a)

&&

b)

||

c)

!

d)

//

e)

~

43.

Perhatikan potongan program dibawah ini !!


do {

delay(50); // wait for sensors to stabilize

x = readSensors(); // check the sensors

.......


Program diatas belum sempurna, potongan program manakah yang tepat untuk menyempurnakan program tersebut ?

a)

var++;

}

b)

case 2:

//do something when var == 2

break;

default:

// if nothing else matches, do the default

// default is optional

}

c)

} while (x < 100);

d)

analogWrite(PWMpin, i);

delay(10);

}

e)

else if (pinFiveInput >= 1000)

{

// do Thing B

}

44.

Struktur pengendali for pada pemrograman arduino berfungsi untuk ?

(a)  

45.

Menunjukkan board apakah angka 10 pada gambar di atas ?

a)

RESET

b)

PIN VCC/GND

c)

PIN I/O DIGITAL

d)

TX/RX

e)

PIN I/O ANALOG

46.

Pertama kali menulis program di Arduino adalah setting, dengan ...

a)

Void Loop

b)

Void setup

c)

Void Input

d)

Void Output

47.

A micro-controller is...

a)

small CPU made of transistors and conductors of heat and sound sensor

b)

portable circuits capable of making other circuits

c)

small computer on a single integrated circuit containing a processor core, memory, and programmable input/output peripherals

d)

small chip made of silver

48.

What does IDE stand for?

a)

Integrated Development Environment

b)

In Deep Environment

c)

Internal Deep Escape

d)

IDE

49.

Before your program “code” can be sent to the board, it needs to be converted into instructions that the board understands. This process is called...

a)

Stop

b)

Compile

c)

Create Sketch

d)

Serial Monitor

50.

Which command is called repetitively over and over again as long as the Arduino has power.

a)

loop ( )

b)

(output)

c)

setup ( )

d)

(input)