wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

UAS - Pengantar Literasi Digital

Total questions: 40

Worksheet time: 17mins

Name
Class
Date
1.

What is the main purpose of using Python programming language?

a)

The primary purpose of Python is to create mobile applications.

b)

Python is known for its simplicity, readability, and versatility across various domains such as web development, data analysis, artificial intelligence, and scientific computing.

c)

Python is primarily used for networking purposes.

d)

Python is mainly used for gaming development.

2.

Explain the difference between a list and a tuple in Python.

a)

Lists are mutable, tuples are immutable.

b)

Lists are immutable, tuples are mutable.

c)

Lists and tuples are the same in Python.

d)

Tuples can hold more elements than lists in Python.

3.

Differentiate between GET and POST methods in HTML forms.

a)

GET method is not secure as data is visible in the URL, while POST method is more secure as data is not visible in the URL.

b)

POST method is visible in the URL

c)

POST method is less secure than GET method

d)

GET method is used for updating data

4.

Write a PHP script to insert data into a MySQL database.

a)

The connection to the MySQL database should be established using PDO instead of mysqli.

b)

Here is a basic example: connect_error) { die('Connection failed: ' . $conn->connect_error); } // SQL query to insert data $sql = 'INSERT INTO table_name (column1, column2, column3) VALUES (value1, value2, value3)'; if ($conn->query($sql) === TRUE) { echo 'New record created successfully'; } else { echo 'Error: ' . $sql . '
' . $conn->error; } $conn->close(); ?>

c)

The SQL query should be enclosed in double quotes instead of single quotes.

d)

The error message should be displayed using `echo` instead of `die`.

5.

What does SQL stands for?

a)

Structured Query Language

b)

Structured Question Language

c)

Strong Question Language

d)

None of the above

6.

SQL is not case sensitive. Is this statement TRUE or FALSE?

a)

TRUE

b)

FALSE

7.

The SQL statement that queries or reads data from a table is __________ .

a)

USE

b)

SELECT

c)

READ

d)

QUERY

8.

The SQL statement that is used to modify data in a table.

a)

UPDATE

b)

SELECT

c)

READ

d)

QUERY

9.

Full form of DML is ______ .

a)

Data Modification language

b)

Data Manipulation Language

c)

Database Manipulation Language

d)

Database Modification Language

10.

Which SQL statement is used to insert new data in a database?

a)

Insert New

b)

Insert Into

c)

Add Record

d)

Add Data

11.

With SQL, how do you select a column named "FirstName" from a table named "Person"?

a)

SELECT FirstName FROM Person

b)

SELECT Person.FirstName

c)

EXTRACT FirstName FROM Person

d)

SELECT FROM Person.FirstName

12.

With SQL, how do you select all the columns from a table named "Persons"?

a)

SELECT [all] FROM Persons

b)

SELECT Persons

c)

SELECT * FROM Persons

d)

SELECT * all.Persons

13.

Hypertext Markup Language, a language used to create web pages

a)

Website Content

b)

Website Structure

c)

Heading

d)

HTML

14.

Which code defines a paragraph

a)

<!DOCTYPE html>

b)

<html>

c)

<p>

d)

<head>

15.

What is the purpose of the PHP function 'echo'?

a)

To perform mathematical operations

b)

To handle exceptions

c)

To define a constant

d)

To display output

16.

What is the main purpose of HTML?

a)

To generate random numbers

b)

To play audio files

c)

To give text structure and meaning

d)

To create animations

17.

What is the file extension for a PHP file?

a)

.css

b)

.php

c)

.html

d)

.js

18.

Which stores whole numbers without decimals, such as 123 or -123?

a)

double

b)

string

c)

int

d)

char

19.

Which stores floating-point numbers, with decimals, such as 19.99 or -19.99?

a)

double

b)

int

c)

char

d)

string

20.

Which stores text values surrounded by double quotes?

a)

double

b)

char

c)

string

d)

int

21.

Why was Python (TM) developed?

a)

To go back to the old way of programming

b)

To create a programming language for students in grade school

c)

To make it easier to learn Java

d)

Python was developed by accident

22.

Python (TM) is owned and managed by

a)

Microsoft (c)

b)

Sun Microsystems (c)

c)

Python (TM) is open source and free to use

d)

Google (c)

23.

Python is ___________ level programming language and is ___________.

a)

High, compiled

b)

High, interpreted

c)

Low, compiled

d)

Low, interpreted

24.

Generally speaking, a low level programming language is easier to read, write and maintain over a high level programming language

a)

True

b)

False

25.

The syntax in Python (TM) is one of the main advantages over other high level programming languages.

a)

True

b)

False

26.

A string

a)

carries out an action

b)

the elements of a command

c)

a collection of characters

d)

how elements in a commad are arranged

27.

What symbol comes before a comment?

a)

$

b)

>>

c)

#

d)

!

28.

A disadvantage of Python is it is harder to debug than other higher level programming languages.

a)

True

b)

False

29.

In programming, a (n) _______________ is a value that can change, depending on conditions or on information passed to the program

a)

string

b)

block

c)

instruction

d)

variable

30.

Since Python (TM) is open source,

a)

Support for using Python (TM) is easy to find

b)

It is free

c)

There is a large catalog of supporting documents

d)

it is a less powerful programming languange

31.

What is the output of the expression?

round(4.5676,2)?

a)

4.5

b)

4.6

c)

4.57

d)

4.56

32.

What is the output?


d = {"john":40, "peter":45}

d["john"]

a)

40

b)

45

c)

“john”

d)

“peter”

33.

The results of the program below are ...

jumlah =[1,2,3,4,5,6,7,8,9]

print(jumlah[-5])

a)

6

b)

5

c)

7

d)

2

34.

The output from the script below is ...

def abc (world):

print ('hello% s'% world) abc ('Python')

a)

Hello world

b)

Hello Python

c)

All answers are missing due to an error

d)

Hello python world

35.

Which of the following items are present in the function header?

a)

function name

b)

function name and parameter list

c)

parameter list

d)

return value

36.

Which of the following keywords marks the beginning of the function block?

a)

fun

b)

define

c)

def

d)

function

37.

What are the two main types of functions?

a)

Custom function

b)

Built-in function & User defined function

c)

User function

d)

System function

38.

What will be the output of the following Python code?

def cube(x):

return x * x * x


x = cube(3)

print (x)

a)

9

b)

3

c)

27

d)

30

39.

Which of the following can add a row to a table?

a)

Add

b)

Insert

c)

Update

d)

Alter

40.

Which of the following is not a keyword of MYSQL?

a)

Select

b)

Top

c)

Group

d)

Insert