# Soal Latihan Pemrograman Dasar

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 Msfiqih
M
Msfiqih
Community Contributor
Quizzes Created: 1 | Total Attempts: 716
Questions: 20 | Attempts: 716

Settings

Dasar-dasar algoritma Variabel Tipe data Operator

• 1.

### Langkah-langkah atau proses ini tentu harus dapat dituliskan dengan jelas dan urut sehingga menghasilkan sebuah keluaran disebut dengan  . . . .

Explanation
The given question states that the steps or process must be clearly and sequentially written in order to produce an output, which is referred to as an algorithm. An algorithm is a set of instructions or a step-by-step procedure for solving a problem or completing a task. It provides a systematic approach to problem-solving by breaking down the problem into smaller, more manageable steps. Therefore, the answer "algoritma" accurately describes the concept of a clearly written and sequential set of steps to produce an output.

Rate this question:

• 2.

### Buku berjudul Al Jabar Wal-Muqabala yang artinya “Buku pemugaran dan pengurangan” (The book of restoration and reduction) adalah karya dari ilmuan muslim abad pertengahan yang dikenal dengan nama . . . .

Explanation
The correct answer is Al-Khuwarizmi. The book titled Al-Jabar Wal-Muqabala, which means "The book of restoration and reduction," is a work by a medieval Muslim scientist known as Al-Khuwarizmi.

Rate this question:

• 3.

• 4.

### Bagian algoritma yang digunakan sebagai tahapan persiapan algoritma adalah . . . .

Explanation
The correct answer is "Deklarasi" because in the given question, it is mentioned that the algorithm is in the preparation stage. In the preparation stage, one of the initial steps is declaring the variables and data types that will be used in the algorithm. This step is called "Deklarasi" in the Indonesian language.

Rate this question:

• 5.

### Bagian algoritma yang berisi langkah-langkah kerja dari algoritma disebut dengan . . . .

Explanation
The given answer "Deskripsi" is correct because it refers to the part of the algorithm that contains the step-by-step instructions or the working procedure of the algorithm. In other words, the "Deskripsi" section describes how the algorithm operates and outlines the specific actions or tasks that need to be performed in order to achieve the desired outcome.

Rate this question:

• 6.

### Sebuah algoritma dijalankan melalui sekian langkah dengan kriteria-kriteria tertentu. Namun ketika ditelusuri, algoritma itu akan berulang ke satu langkah secara terus menerus sehingga tidak ada jaminan algoritma tersebut berhenti. Ini artinya algoritma tidak memenuhi sifat...

Explanation
The given statement describes an algorithm that continuously repeats one step without any guarantee of stopping. This indicates that the algorithm does not satisfy the property of being finite.

Rate this question:

• 7.

### Algoritma Hitung 1) Baca masukkan a 2) Baca masukan b 3) Jika a lebih besar b maka lanjut ke langkah 4, jika tidak lanjut ke langkah 5 4) Ubah nilai a menjadi a dikurangi b, ulangi lagi langkah 3 5) Tuliskan a 6) Selesai Tentukan output dari algoritma di atas jika dimasukkan nilai a adalah 23 dan b adalah 4 !

Explanation
The algorithm first reads the input values of a and b. Then, it compares if a is greater than b. In this case, 23 is indeed greater than 4, so it proceeds to step 4. In step 4, it subtracts b from a and repeats step 3. Since 19 is still greater than 4, it repeats step 4 again and subtracts 4 from 19, resulting in 15. At this point, a is no longer greater than b, so it proceeds to step 5 and outputs the value of a, which is 15. Therefore, the output of the algorithm for the given input values is 15.

Rate this question:

• 8.

### Suatu simbol yang diguanakan untuk menyimpan nilai tertentu disebut dengan . . . .

Explanation
A variable is a symbol used to store a specific value. It is a way to represent and store data in programming. Variables can hold different types of values such as numbers, strings, or boolean values. They are used to store and manipulate data throughout a program. In this context, the correct answer "variabel" accurately describes the symbol used to store a specific value.

Rate this question:

• 9.

### Dalam perhitungan gaji sebuah perusahaan, total gaji diperoleh dari beberapa komponen, gaji pokok, tunjangan jabatan, tunjangan keluarga, dipotong dengan asuransi dan hutang. Di antara variabel-variabel tersebut yang merupakan varaibel output adalah ....

Explanation
The total gaji (salary) is the output variable in the calculation of an employee's salary in a company. It is the final amount that an employee receives after considering various components such as gaji pokok (basic salary), tunjangan jabatan (position allowance), tunjangan keluarga (family allowance), and deductions such as asuransi (insurance) and hutang (debt). The total gaji represents the overall payment that an employee earns from the company.

Rate this question:

• 10.

### Tipe data yang berupa bilangan bulat, termasuk bilangan bulat negatif, nol ataupun bulat positif adalah . . . .

Explanation
The correct answer is "Integer" because the question is asking for the data type that includes whole numbers, including negative numbers, zero, and positive numbers. The data type "Integer" fits this description as it represents whole numbers without any decimal or fractional parts.

Rate this question:

• 11.

### Tipe data bilangan yang dapat menyimpan bilangan pecahan adalah . . . .

Explanation
The correct answer is "Real". Real data type is used to store decimal numbers with both integer and fractional parts. It allows for the representation of numbers with a decimal point, making it suitable for storing and performing calculations on fractional values.

Rate this question:

• 12.

### Tipe data berupa digits, huruf atau simbol tunggal adalah . . .

Explanation
The correct answer is "Karakter." In computer programming, data types are used to classify different types of data that can be stored and manipulated in a program. Characters are a specific data type that represents individual letters, digits, or symbols. They are typically used to store text or individual characters in a program. Therefore, the given answer "Karakter" accurately describes the data type consisting of digits, letters, or single symbols.

Rate this question:

• 13.

### Tipe data yang terdiri dari susunan dari satu atau lebih karakter adalah . . . .

Explanation
The correct answer is "String". A string is a data type that consists of a sequence of one or more characters. It is used to represent textual data in programming languages. Strings are typically enclosed in quotation marks and can include letters, numbers, symbols, and spaces. They can be manipulated and processed using various string manipulation functions and operations.

Rate this question:

• 14.

### Tipe data yang digunakan untuk menyatakan status Benar atau Salah dari suatau variabel adalah . . . .

Explanation
The correct answer is Boolean. Boolean is a data type that is used to represent true or false values. It is commonly used in programming to express conditions or to store the result of a comparison. In this case, the question is asking for the data type used to represent the true or false status of a variable, and the correct answer is Boolean.

Rate this question:

• 15.

### Jika didefinisikan variabel Agama dimana nilai data menggunakan inisial, misalkan I untuk Islam, P untuk Kristen Protestan, K untuk Katolik, B untuk Budha dan H untuk Hindu, maka tipe data yang tepat untuk variabel di atas adalah ....

Explanation
The correct answer is "Karakter". In this question, the variable "Agama" is defined to store values using initials, such as I for Islam, P for Kristen Protestan, K for Katolik, B for Budha, and H for Hindu. Since these values are represented by single characters, the appropriate data type to use for the variable is "Karakter" (Character).

Rate this question:

• 16.

### Simbol yang digunakan untuk melakukan pemrosesan variabel input untuk menghasilkan sebuah output disebut dengan . . .

Explanation
The given correct answer is "Operator". In programming, an operator is a symbol that is used to perform operations on variables or values. It is used to manipulate the input variables and generate an output. Operators can be used for mathematical calculations, logical operations, assignment operations, and more. They play a crucial role in programming as they allow the programmer to perform different actions and manipulate data according to their requirements.

Rate this question:

• 17.

### Nilai/variabel yang akan diproses disebut dengan . . . .

Explanation
The correct answer is "Ekspresi". In programming, the term "ekspresi" refers to a combination of variables, constants, and operators that are evaluated to produce a value. It is the value that is processed or used in a program. An expression can be as simple as a single variable or can involve complex calculations using multiple variables and operators.

Rate this question:

• 18.

### Operator yang digunakan untuk membagi bilangan pertama dengan bilangan kedua, di mana hasilnya adalah bagian bulat dari hasil pembagiannya adalah . . . .

Explanation
The operator "Div" is used to divide the first number by the second number and the result is the integer part of the division.

Rate this question:

• 19.

### Operator yang diguanakan untuk membagi bilangan pertama dengan bilangan kedua, di mana hasilnya merupakan sisa dari hasil pembagiannya adalah . . . .

Explanation
The operator used to divide the first number by the second number and obtain the remainder of the division is called the modulus operator, commonly denoted as "Mod".

Rate this question:

• 20.

### Operator ==, <, >, <>, adalah termasuk dalam kategori operator . . . .

Explanation
The given correct answer is "Relasional". The operators mentioned, ==, , are all relational operators. Relational operators are used to compare two values and determine the relationship between them, such as equality, inequality, greater than, and less than. These operators are commonly used in programming languages to make decisions and control the flow of a program based on the comparison results.

Rate this question: