Algoritma Pertemuan 2

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Henilei
H
Henilei
Community Contributor
Quizzes Created: 11 | Total Attempts: 4,508
| Attempts: 699
SettingsSettings
Please wait...
  • 1/20 Questions

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

    • True
    • False
Please wait...
About This Quiz

.

Algoritma Pertemuan 2 - Quiz

Quiz Preview

  • 2. 

    Dalam algoritma perintah P = Q ditulis P<-Q

    • True

    • False

    Correct Answer
    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 

    • True

    • False

    Correct Answer
    A. 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?

    Correct Answer
    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 ?

    Correct Answer
    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

    • True

    • False

    Correct Answer
    A. 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

    • String

    • Integer

    • Float

    • Enumerated

    Correct Answer(s)
    A. String
    A. Integer
    A. 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 

    • Bilangan bulat

    • Bilangan desimal

    • True dan false

    • Alfanumerik (alfabet dan numerik)  dan simbol

    Correct Answer
    A. 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

    • True

    • False

    Correct Answer
    A. 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. 

    Jarijari = 7. jarijari adalah variabel, 7 adalah nilainya

    • True

    • False

    Correct Answer
    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

    • True

    • False

    Correct Answer
    A. 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

    • True

    • False

    Correct Answer
    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

    • True

    • False

    Correct Answer
    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

    • True

    • False

    Correct Answer
    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 

    Correct Answer
    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

    Correct Answer
    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

    • True

    • False

    Correct Answer
    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

    • True

    • False

    Correct Answer
    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)

    • True

    • False

    Correct Answer
    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. 

    Operator + bisa digunakan untuk menjumlahkan dua nilai bertipe integer, float, dan juga bisa digunakan untuk menggabung string

    • True

    • False

    Correct Answer
    A. True
    Explanation
    The explanation for the given correct answer is that the "+" operator can indeed be used to add two values of type integer or float, as well as to concatenate two strings. This means that it is possible to perform addition operations on numerical values and combine strings using the "+" operator. Therefore, the statement is true.

    Rate this question:

Quiz Review Timeline (Updated): Jul 22, 2024 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Jul 22, 2024
    Quiz Edited by
    ProProfs Editorial Team
  • Sep 23, 2020
    Quiz Created by
    Henilei
Back to Top Back to top
Advertisement