# Algoritma Pertemuan 2

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
| By Henilei
H
Henilei
Community Contributor
Quizzes Created: 12 | Total Attempts: 4,719
Questions: 20 | Attempts: 687

Settings

.

• 1.

### Variabel adalah tempat menyimpan nilai yang isinya TIDAK KONSTAN (selalu berubah – sesuai dengan kondisi Variabel terKINI)

• A.

True

• B.

False

A. True
Explanation
This statement is true because variables are used to store values that can change or vary. Unlike constants, which have fixed values, variables can be assigned different values based on the current conditions or requirements. Therefore, the statement accurately describes the nature of variables as being non-constant and subject to change.

Rate this question:

• 2.

### Dalam algoritma perintah P = Q ditulis P<-Q

• A.

True

• B.

False

A. True
Explanation
The given statement is true because in algorithmic notation, the assignment operator is represented by the symbol "

Rate this question:

• 3.

### Perintah P<-Q artinya Nilai P diberi harga Nilai P Nilai Q

• A.

True

• B.

False

B. False
Explanation
The statement "Perintah P

Rate this question:

• 4.

### Diketahui P=10, Q=15 dan R=5. Diberikan Algoritma P=Q,Q=R, mk Nilai R sekarang?

5
Explanation
The given algorithm assigns the value of Q to P and the value of R to Q. Since the initial value of R is 5, after executing the algorithm, the value of R will remain 5.

Rate this question:

• 5.

### Diketahui Algoritma P=11, P=P+1 dan Q = P Berapakan Nilai Q ?

12
Explanation
The given algorithm states that P is initially 11, and then P is incremented by 1. After that, the value of Q is set equal to P. Since P is incremented to 12, the value of Q will also be 12.

Rate this question:

• 6.

### Diketahui 3 variabel peubah P,Q dan R. Agar isi Q ditaruh di P maka ditulis Q = P

• A.

True

• B.

False

B. False
Explanation
The given statement is false because the correct way to write the statement "Q is placed in P" is P = Q, not Q = P. In mathematical notation, the variable on the left side of the equation represents the container or destination, while the variable on the right side represents the content or source. Therefore, the correct equation should be P = Q.

Rate this question:

• 7.

### Tipe-tipe data dasar/sederhana yaitu

• A.

String

• B.

Integer

• C.

Float

• D.

Enumerated

A. String
B. Integer
C. Float
Explanation
The given answer lists the basic/simple data types, which include string, integer, and float. These data types are commonly used in programming to represent different kinds of values. A string is used to store text, an integer is used to store whole numbers, and a float is used to store decimal numbers. These data types are fundamental building blocks in programming and are essential for storing and manipulating data.

Rate this question:

• 8.

### Tipe data boolean bernilai

• A.

Bilangan bulat

• B.

Bilangan desimal

• C.

True dan false

• D.

Alfanumerik (alfabet dan numerik)  dan simbol

C. True dan false
Explanation
The correct answer is "True dan false". Boolean data type in programming can only have two possible values, which are true and false. It is used to represent logical values and is commonly used in conditional statements and comparisons. The boolean data type is not associated with any numeric values or alphanumeric characters.

Rate this question:

• 9.

### Tipe data List hanya bisa berisi adat dengan nilai yang sama

• A.

True

• B.

False

B. False
Explanation
The given statement is false. The data type List can contain elements with different values. A List is a collection that can hold multiple items of any data type, including different values. The elements in a List can be of different types, such as integers, strings, or even other Lists. Therefore, the statement that a List can only contain elements with the same value is incorrect.

Rate this question:

• 10.

• A.

True

• B.

False

A. True
Explanation
The explanation for the given correct answer is that the statement is stating that "jarijari" is a variable and its value is 7. This is true because in programming, variables are used to store values, and in this case, "jarijari" is assigned a value of 7. Therefore, the answer is true.

Rate this question:

• 11.

### Ruang="201". variabel ruang bertipe integer

• A.

True

• B.

False

B. False
Explanation
The given statement is false because the variable "ruang" is declared as a string type, not an integer type. The value "201" is enclosed in quotation marks, indicating that it is a string literal. Therefore, the variable "ruang" is of type string, not integer.

Rate this question:

• 12.

### Tipe data tuple hampir sama dengan list, perbedaanya anggotanya tidak bisa diubah setelah dideklarasikan

• A.

True

• B.

False

A. True
Explanation
The statement is true because tuples and lists are both data structures in Python, but the main difference is that the elements in a tuple cannot be changed or modified after they are declared. This is known as immutability. In contrast, elements in a list can be modified, added, or removed at any time. Therefore, once a tuple is created, its elements remain constant, making it a suitable choice for storing data that should not be changed.

Rate this question:

• 13.

### Tipe data tuple menggunakan kurung biasa dan dipisahkan dengan koma untuk anggota

• A.

True

• B.

False

A. True
Explanation
The statement is true because tuples in Python are created using parentheses and the elements are separated by commas. Tuples are immutable, meaning they cannot be modified once created. They are commonly used to store related pieces of information together, such as coordinates or RGB values.

Rate this question:

• 14.

### Simbol ** dan % termasuk operator aritmatika

• A.

True

• B.

False

A. True
Explanation
The given statement is true. The symbols ** and % are indeed arithmetic operators. The symbol ** represents exponentiation, where a number is raised to the power of another number. For example, 2 ** 3 equals 8. The symbol % represents the modulus operator, which calculates the remainder of a division operation. For example, 10 % 3 equals 1, as 10 divided by 3 leaves a remainder of 1. Therefore, both ** and % are valid arithmetic operators.

Rate this question:

• 15.

### Ekspresi 2**3 hasilnya

8
Explanation
The expression 2**3 means 2 raised to the power of 3. This can be calculated as 2*2*2, which equals 8.

Rate this question:

• 16.

### Ekspresi 2%2 hasilnya

0
Explanation
The expression "2%2" represents the remainder when dividing 2 by 2. Since 2 can be divided evenly by 2, the remainder is 0. Therefore, the result of the expression is 0.

Rate this question:

• 17.

### Ekspresi (kalimat matematika) adalah perintah yang terdiri dari operand dan operator

• A.

True

• B.

False

A. True
Explanation
This statement is true because an expression in mathematics is indeed a command that consists of operands and operators. Operands are the values or variables on which the operators act, while operators are symbols that represent specific mathematical operations such as addition, subtraction, multiplication, and division. Therefore, an expression is formed by combining operands and operators to perform calculations or evaluate a mathematical statement.

Rate this question:

• 18.

### Dalam ekspresi 6+7, 6 dan 7 adalah operand, + adalah operator

• A.

True

• B.

False

A. True
Explanation
The given statement is true because in the expression 6+7, 6 and 7 are the operands, which are the values or variables that the operator (in this case, +) operates on. The operator, +, performs the addition operation on the operands 6 and 7. Therefore, the statement correctly identifies the operands and the operator in the expression.

Rate this question:

• 19.

### Apabila nilai dioperasikan dengan operator XOR (eXclusive OR) outputnya 0 (false) jika kedua nilai yang dioperasikan sama. misalnya 1 (true) dan 1 (true) maka outputnya 0 (false)

• A.

True

• B.

False

A. True
Explanation
The explanation for the given correct answer is that when the XOR operator is applied to two equal values, the output is always 0 (false). In this case, if both values are 1 (true), the result of the XOR operation will be 0 (false). Therefore, the answer is true.

Rate this question:

• 20.

• A.

True

• B.

False