Algorithms and Programming C/C++ 6
Array/ListAn array (or list) is a collection that contains multiple pieces of data. Generally, an array has indices (a sequence in the collection of data) that start from 0. To declare an array, you can add square brackets “[]” after the variable name and initialize it with curly braces “{},” separating each data element with a comma “,”. Basic Example of Using an Array:123456789101112#include <stdio.h>#include <iostream>#include <math.h>using namespace std;int main() {...
Algorithms and Programming C/C++ 5
Object Oriented ProgrammingObject Oriented Programming (OOP) is a programming paradigm based on the concept of “objects.” For example, consider a remote-controlled toy car: the car itself is the object, and the remote control is the tool used to operate it. The RC car can be controlled to move forward, backward, left, and right through the remote, which illustrates the basic concept of object-oriented programming. Programming languages like C/C++ support OOP through features like functions. F...
Web Programming
PengantarSebelum Mempelajari Pemrograman Web, Umumnya anda harus mempelajari beberapa hal sebagai pengantar kedepannya agar mempermudah dalam mempelajari Pemrograman Web diantaranya ialah fundamental dasar bahasa pemrograman dan beberapa pengantar serta pendahuluan. PendahuluanPendekatan yang digunakan di awal, siswa diajak untuk mengenali program-program kecil yang isinya adalah elemen pembangun program: ekspresi, assignment, kondisional dan loop. Pada kenyataannya, sebuah program mengandung...
Algorithms and Programming C/C++ 4
Control Structure IILoopingLooping, or iteration, is a program structure that causes repeated execution of a block of code. There are two types of loops: Loops with a known number of iterations (For Loop) Loops with an unknown number of iterations (While Loop) For LoopThe For Loop is commonly used when the number of iterations is known. It can be declared using the keyword for, followed by the initialization of the starting value, a condition to stop, and the increment/decrement of the init...
Algorithms and Programming C/C++ 3
Control Structure IThis is a paradigm for directing the flow of a program in a specific direction. To master the material on control structures in C/C++ programming, there are several key points that need to be understood. Boolean Expression Operator Comparison Operator Logical Operator Program Construction Control structures are divided into two categories: Branching Structure Looping Structure Conditional Structure (Conditional Statement)Branching Constructs & Program BlockA branc...
Algorithms and Programming C/C++ 2
Data TypesIn programming languages, a data type is a category that defines the type of data being represented. Each piece of data has a different data type, such as numeric data, character data, and others. The common data types in programming are known as primitive data types (meaning they are the most frequently encountered types in programming and are also the oldest types available today). C/C++ is a pioneering programming language for primitive data types and has inspired the creation of...
Algorithms and Programming C/C++ 1
IntroductionBefore learning the C/C++ programming language, it is generally recommended to study a few foundational concepts that will facilitate your understanding of C/C++. OverviewAt the outset, students are introduced to small programs that contain the building blocks of programming: expressions, assignments, conditionals, and loops. In reality, a program is a mixture of these building elements. Students need to synthesize and integrate their knowledge by “deconstructing” sample programs,...
Algorithms and Programming Python 7
Switching to Google ColabStarting from this session, we will move away from the Programiz Online Python Compiler (used in Meetings 1–6) and use Google Colab instead. This change is necessary because this session covers File Handling, and Programiz — like most simple online compilers — doesn’t properly support persistent file read/write operations, making it impossible to properly practice opening, writing, reading, and appending files. Google Colab (Colaboratory) is a free, cloud-based Jupyte...
Algorithms and Programming Python 6
Object-Oriented Programming IIObject-Oriented Programming (OOP) is a programming paradigm based on the concept of “objects.” For example, consider a remote-controlled toy car: the car itself is the object, and the remote control is the device that controls it. You can move the RC car forward, backward, left, and right using the remote, illustrating the basic concept of OOP. Python supports Object-Oriented Programming through features like functions and classes. ClassA class is a prototype, bl...
Algorithms and Programming Python 5
Object-Oriented Programming IObject-Oriented Programming (OOP) is a programming paradigm based on the concept of “objects.” For example, consider a remote-controlled toy car: the car itself is the object, and the remote control is the device that controls it. You can move the RC car forward, backward, left, and right using the remote, illustrating the basic concept of OOP. Python supports Object-Oriented Programming through features like functions and classes. Definition (Function)Before delv...



