The document provides an introduction to basic programming concepts through 10 lessons:
1) It defines programs, programming, and programming languages. Programs direct computers using organized instructions. Programming is creating commands to direct computers. Programming languages allow communication with computers.
2) It discusses generations of programming languages from low-level machine code to high-level languages.
3) It covers structured and object-oriented programming approaches.
4) It defines translators like assemblers, interpreters, and compilers that translate human-readable code into machine-readable code.
5) It provides an overview of installing and using the Visual Basic programming language.
6) It identifies the basic elements of programming:
The document discusses the five main phases of program development:
1) Problem analysis phase where the programmer identifies the client's needs.
2) Program design phase where the programmer designs a flowchart representing the client's needs.
3) Coding phase where the programmer performs coding.
4) Testing and debugging phase where the program is tested by users and errors are debugged.
5) Documentation phase where the programmer completes documentation including a user manual and program listing.
The five main phases of program development are problem analysis, program design, coding, testing and debugging, and documentation. In the problem analysis phase, the programmer interviews the client to understand their needs. In the program design phase, the programmer designs a flowchart representing the client's needs. In the coding phase, the programmer writes the code. In testing and debugging, the program is tested for errors which are debugged. Finally, in the documentation phase, documentation for the program is completed.
This document discusses problem solving techniques in programming. It provides an overview of programming languages, techniques for solving problems, an introduction to C programming, and why data and programs are needed. Key points include:
- Programming involves specifying computational steps to solve problems using a programming language.
- Problem solving requires both an intuitive and scientific approach, following general steps like defining the problem, identifying variables, making assumptions, and evaluating answers.
- C programming is a general-purpose language useful for systems programming and applications. It allows for structured programming with control structures.
- Any computer program requires both carefully planned data and a program, as they are highly dependent on each other.
This document provides an introduction to the Standard ML programming language. It discusses how Standard ML combines the virtues of functional and imperative programming. Standard ML is formally defined and consists of a core language for small-scale programming and a module system for large-scale programming. The core language is a higher-order procedural language with an applicative subset, which is the focus of the tutorial. It aims to discuss functions, particularly recursive functions, types and type inference, aggregates, evaluation, abstract data types, imperative programming, and Standard ML modules.
This document provides an introduction to programming module for secondary school students in Malaysia. It begins with definitions of programming and programming languages. It then discusses different levels of programming languages from machine language to natural language. Examples of popular programming languages like BASIC, COBOL, Pascal, C, FORTRAN, Visual BASIC, C++ and Java are provided. The document also explains the typical phases in program development like problem analysis, program design, coding, testing and debugging, and documentation. It concludes by providing an overview of the Just BASIC V1.01 programming tool for creating simple programs.
This document discusses several topics related to computer programming including:
1. It defines what a program and programming are, comparing a program to a recipe.
2. It explains different programming languages like BASIC, Pascal, C, and Smalltalk as well as careers in programming like a programmer, programmer analyst, computer scientist, and software engineer.
3. It describes the different generations of programming languages from low-level machine languages to high-level languages like C++ and the differences between structured and object-oriented programming.
The document discusses various topics related to programming languages including:
- The definitions and generations of programming languages from machine language to fifth generation languages like Prolog.
- The differences between structured and object-oriented programming approaches. Structured programming uses top-down design while object-oriented programming packages data and functions into objects.
- The translation methods of assemblers, interpreters, and compilers in converting source code to machine-readable code. Assemblers translate assembly language, interpreters interpret code line-by-line, and compilers convert entire programs.
- Common programming elements like variables, data types, operators, and the phases of program development from problem analysis to documentation.
The document discusses programming languages and the programming process. It describes how programs are written in programming languages, which are sets of rules that allow humans to communicate with computers. It outlines the main stages of the programming process: defining the problem, planning the solution, coding the program, testing it, and documenting it. It also explains different types of programming languages like low-level machine language and assembly language, and high-level languages that are easier for humans to read and write.
The document discusses the five main phases of program development:
1) Problem analysis phase where the programmer identifies the client's needs.
2) Program design phase where the programmer designs a flowchart representing the client's needs.
3) Coding phase where the programmer performs coding.
4) Testing and debugging phase where the program is tested by users and errors are debugged.
5) Documentation phase where the programmer completes documentation including a user manual and program listing.
The five main phases of program development are problem analysis, program design, coding, testing and debugging, and documentation. In the problem analysis phase, the programmer interviews the client to understand their needs. In the program design phase, the programmer designs a flowchart representing the client's needs. In the coding phase, the programmer writes the code. In testing and debugging, the program is tested for errors which are debugged. Finally, in the documentation phase, documentation for the program is completed.
This document discusses problem solving techniques in programming. It provides an overview of programming languages, techniques for solving problems, an introduction to C programming, and why data and programs are needed. Key points include:
- Programming involves specifying computational steps to solve problems using a programming language.
- Problem solving requires both an intuitive and scientific approach, following general steps like defining the problem, identifying variables, making assumptions, and evaluating answers.
- C programming is a general-purpose language useful for systems programming and applications. It allows for structured programming with control structures.
- Any computer program requires both carefully planned data and a program, as they are highly dependent on each other.
This document provides an introduction to the Standard ML programming language. It discusses how Standard ML combines the virtues of functional and imperative programming. Standard ML is formally defined and consists of a core language for small-scale programming and a module system for large-scale programming. The core language is a higher-order procedural language with an applicative subset, which is the focus of the tutorial. It aims to discuss functions, particularly recursive functions, types and type inference, aggregates, evaluation, abstract data types, imperative programming, and Standard ML modules.
This document provides an introduction to programming module for secondary school students in Malaysia. It begins with definitions of programming and programming languages. It then discusses different levels of programming languages from machine language to natural language. Examples of popular programming languages like BASIC, COBOL, Pascal, C, FORTRAN, Visual BASIC, C++ and Java are provided. The document also explains the typical phases in program development like problem analysis, program design, coding, testing and debugging, and documentation. It concludes by providing an overview of the Just BASIC V1.01 programming tool for creating simple programs.
This document discusses several topics related to computer programming including:
1. It defines what a program and programming are, comparing a program to a recipe.
2. It explains different programming languages like BASIC, Pascal, C, and Smalltalk as well as careers in programming like a programmer, programmer analyst, computer scientist, and software engineer.
3. It describes the different generations of programming languages from low-level machine languages to high-level languages like C++ and the differences between structured and object-oriented programming.
The document discusses various topics related to programming languages including:
- The definitions and generations of programming languages from machine language to fifth generation languages like Prolog.
- The differences between structured and object-oriented programming approaches. Structured programming uses top-down design while object-oriented programming packages data and functions into objects.
- The translation methods of assemblers, interpreters, and compilers in converting source code to machine-readable code. Assemblers translate assembly language, interpreters interpret code line-by-line, and compilers convert entire programs.
- Common programming elements like variables, data types, operators, and the phases of program development from problem analysis to documentation.
The document discusses programming languages and the programming process. It describes how programs are written in programming languages, which are sets of rules that allow humans to communicate with computers. It outlines the main stages of the programming process: defining the problem, planning the solution, coding the program, testing it, and documenting it. It also explains different types of programming languages like low-level machine language and assembly language, and high-level languages that are easier for humans to read and write.
This document discusses basic programming concepts including:
1) A program is a set of instructions that directs a computer to perform tasks. Programming involves writing programs using programming languages.
2) There are different generations of programming languages from low-level machine languages to high-level languages that are more abstract and portable.
3) The five basic elements in programming are: data types, variables, constants, operators, and control structures. Variables can be changed during program execution while constants remain fixed.
1. Programming languages enable humans to communicate with computers by using words, symbols, and codes to direct a computer to perform tasks and control mechanical devices.
2. Early programming languages progressed from machine language and assembly language as first and second generation languages, to higher-level languages like FORTRAN, BASIC, and COBOL as third generation languages. Fourth and fifth generation languages provided more specialized and visual interfaces.
3. Key aspects of programming include structured and object-oriented design, variables and constants, operators, flow control, translation methods like compilers and interpreters, and the development process of problem analysis, design, coding, testing and documentation. Understanding different programming elements and techniques is essential for writing effective programs.
The document provides an overview of programming concepts including programs, programming languages, translators, generations of programming languages, basic elements in programming, and pseudo code. It defines key terms like program, programming, constants, variables, data types, operators, control structures, assemblers, interpreters, compilers, structured programming, and object-oriented programming. Examples are given for different programming languages, data types, operators, and a pseudo code program. The document is intended as part of an educational lesson on basic programming concepts.
The document provides information about programming and programming languages. It discusses what a program and programming are, and defines a programming language as a set of words, symbols and codes that enables humans to communicate with computers. It describes different generations of programming languages from machine language and assembly language as first generation languages to fourth and fifth generation languages that provide more abstraction and visual interfaces. The document also discusses different programming approaches like structured and object-oriented programming. It explains how programs written in high-level languages need to be translated into machine language by compilers, interpreters or assemblers. Finally, it discusses basic elements in programming like constants, variables, data types, operators and control structures.
The document provides information about programming languages and C language. It discusses three levels of programming languages - machine language, assembly language, and high-level languages. It then describes C language in detail, including its history, basic structure of a C program, execution process, variables, keywords, constants, and data types used in C. The document is intended as a introductory guide or textbook on C programming.
This document provides an overview of basic programming concepts through 11 lessons. It begins by defining what a program and programming are, and explains that a program contains variables and statements that direct a computer. It then discusses programming languages, generations of programming languages from machine code to visual languages, and programming approaches like structured and object-oriented programming. Other topics covered include translators like compilers and interpreters, how to install Visual Basic 6.0, basic programming elements, operators, data types, pseudocode, and flowcharts. The document aims to introduce foundational programming concepts for beginners in a structured manner through examples and explanations.
This document provides an introduction to basic programming concepts including programs, programming, programming languages, and careers in programming.
A program is a series of organized instructions that directs a computer to perform tasks. Programming involves creating a set of commands that direct a computer. Programming languages allow humans to communicate with computers through using words, symbols, and codes. There are many programming languages with different rules. Careers in programming include programmer, programmer analyst, computer scientist, and software engineer.
The document outlines the steps to develop a basic math operations program in Visual Basic to help the programmer's younger brother learn addition, subtraction, multiplication, and division. The program will take two integer numbers as input, allow the user to select an operation, perform the calculation, and display the output. The development phases include problem analysis, program design with pseudo code and flowchart, coding the formulas, testing and debugging, and documentation.
Modular programming involves breaking large programs into smaller modules or blocks. Each module performs a single, well-defined task and has defined inputs and outputs. Modules can be reused across multiple programs, making programs easier to debug. Languages like Modula-2 were designed to support modular programming, which later evolved into object-oriented programming. The document then discusses the basic attributes and control relationships of modular programming, as well as module design requirements and types of communication between modules.
This document provides an introduction to computing concepts such as computers, programming, and algorithms. It defines a computer as a device that can perform vast calculations quickly. The basic components of a computer system are described as the input, output, storage, central processing unit (CPU), arithmetic logic unit (ALU), and control unit. Programming is defined as the process of writing instructions for a computer to perform tasks, and why learning it is important. Programming languages allow humans to communicate with computers through language-like structures. The skills needed for programming include proficiency with programming languages, problem-solving abilities, and developing algorithms. Algorithms are then introduced as step-by-step processes to solve problems, and different ways to represent algorithms like
The document discusses various aspects of system development including programming languages, paradigms, and software development lifecycles. It describes the key characteristics of programming languages including syntax and semantics. It also outlines the main programming paradigms - imperative, object-oriented, logic, and functional. The document then discusses software design paradigms such as design patterns, components, architecture, and frameworks. It provides an overview of common software development lifecycles including build and fix, waterfall, and spiral models.
This document discusses computer programming languages and number systems. It begins by defining programming languages and categorizing them into machine language, assembly language, and high-level languages. It then covers number systems used in computers like binary, octal, hexadecimal, and decimal. Binary arithmetic operations like addition, subtraction, multiplication, and division are explained. Negative numbers in binary are also discussed.
The document describes a book titled "C Programs with Solutions" by S. Anandamurugan. The book provides a rich collection of C programs with solutions to support theoretical concepts. It is intended to help students of engineering and computer science understand C programming concepts better. The book covers fundamental C concepts, introduction to C programming, sample programs, debugging techniques, sample questions and answers.
The document provides an overview of software programming and development. It defines key concepts like software, hardware, programming languages, compilers, interpreters, and algorithms. It discusses low-level languages like machine code and assembly, and high-level languages like C/C++, Java, and .NET. It also explains the planning process for computer programs using algorithms, flowcharts, and pseudocode and the differences between compilers and interpreters. The document aims to introduce foundational topics in software engineering.
This document describes a summer internship project called "Graphical Interpreter: Buddhuram Dumbo in Action" conducted at IIT Bombay. The project involved developing a graphical interpreter application to allow students to input C code and observe how it is executed step-by-step. Key components of the application included a parser to tokenize the input code, graphical interface functions to generate animations, and modules to handle I/O, memory representation, and error handling. The goal was to help students better understand basic computer architecture concepts through interactive experimentation with code execution.
The document provides an overview of the C programming language, including its history, characteristics, and structure. It discusses how C was developed in the 1970s at Bell Labs to program the UNIX operating system. It also summarizes key aspects of C like it being a middle-level language suitable for both systems and applications programming, its use of control structures for selection, repetition and loops, and its portability across operating systems.
This document provides an introduction to computer programming and programming languages. It discusses what programming is, the history and evolution of programming languages from machine languages to higher-level languages. It describes assembly languages, third-generation languages like Java and C++, fourth-generation languages, and debates the existence of fifth-generation languages. The document also discusses Java in more detail, including its history, editions, features, environment, and common misconceptions. It provides an example of a simple "Hello World" Java program.
The document provides information about database objects in Microsoft Access, including queries, forms, and reports. It defines queries as objects that retrieve specific information from a database. Forms allow users to add, modify, and view information from tables or queries. Reports summarize information from the database for printing purposes. The document discusses how to create and use these different database objects.
The document provides information on data, information, and information systems. It defines data as raw unorganized material that has little value on its own. Information is organized data that is meaningful to a user. An information system is a set of related components that collects data, processes it, and provides information. It gives examples of information systems used in education like learning management systems, and information systems used in business for online shopping, transportation, and hotel booking.
The document discusses the concept of multimedia, defining it as the presentation of information using a combination of text, audio, graphics, video, and animation. It provides examples of how multimedia is used in various aspects of life, such as in business, entertainment, and education. The document also examines key elements of multimedia like hardware, software, file formats, and how authoring tools can be used to integrate different multimedia elements into interactive applications.
A multimedia production team consists of various roles including a project manager, subject matter expert, graphic artist, audio/video technician, instructional designer, and programmer. The project manager defines the project scope and coordinates the team. Each role contributes different elements - the subject matter expert provides content, the graphic artist develops visual elements, the audio/video technician records and edits sound/video, the instructional designer plans educational strategies, and the programmer codes the program. The team goes through various phases from analysis to design, implementation, testing, evaluation, and publishing to produce high-quality multimedia applications.
This document provides information about computer security and threats. It discusses defining computer security, types of security including hardware, software/data, and network security. It also covers computer threats such as malicious code like viruses, Trojan horses, logic bombs, and worms. Additional threats discussed are hackers, natural disasters, theft, and security measures to protect against these threats like data backup, cryptography, antivirus software, anti-spyware, and firewalls.
This document discusses basic programming concepts including:
1) A program is a set of instructions that directs a computer to perform tasks. Programming involves writing programs using programming languages.
2) There are different generations of programming languages from low-level machine languages to high-level languages that are more abstract and portable.
3) The five basic elements in programming are: data types, variables, constants, operators, and control structures. Variables can be changed during program execution while constants remain fixed.
1. Programming languages enable humans to communicate with computers by using words, symbols, and codes to direct a computer to perform tasks and control mechanical devices.
2. Early programming languages progressed from machine language and assembly language as first and second generation languages, to higher-level languages like FORTRAN, BASIC, and COBOL as third generation languages. Fourth and fifth generation languages provided more specialized and visual interfaces.
3. Key aspects of programming include structured and object-oriented design, variables and constants, operators, flow control, translation methods like compilers and interpreters, and the development process of problem analysis, design, coding, testing and documentation. Understanding different programming elements and techniques is essential for writing effective programs.
The document provides an overview of programming concepts including programs, programming languages, translators, generations of programming languages, basic elements in programming, and pseudo code. It defines key terms like program, programming, constants, variables, data types, operators, control structures, assemblers, interpreters, compilers, structured programming, and object-oriented programming. Examples are given for different programming languages, data types, operators, and a pseudo code program. The document is intended as part of an educational lesson on basic programming concepts.
The document provides information about programming and programming languages. It discusses what a program and programming are, and defines a programming language as a set of words, symbols and codes that enables humans to communicate with computers. It describes different generations of programming languages from machine language and assembly language as first generation languages to fourth and fifth generation languages that provide more abstraction and visual interfaces. The document also discusses different programming approaches like structured and object-oriented programming. It explains how programs written in high-level languages need to be translated into machine language by compilers, interpreters or assemblers. Finally, it discusses basic elements in programming like constants, variables, data types, operators and control structures.
The document provides information about programming languages and C language. It discusses three levels of programming languages - machine language, assembly language, and high-level languages. It then describes C language in detail, including its history, basic structure of a C program, execution process, variables, keywords, constants, and data types used in C. The document is intended as a introductory guide or textbook on C programming.
This document provides an overview of basic programming concepts through 11 lessons. It begins by defining what a program and programming are, and explains that a program contains variables and statements that direct a computer. It then discusses programming languages, generations of programming languages from machine code to visual languages, and programming approaches like structured and object-oriented programming. Other topics covered include translators like compilers and interpreters, how to install Visual Basic 6.0, basic programming elements, operators, data types, pseudocode, and flowcharts. The document aims to introduce foundational programming concepts for beginners in a structured manner through examples and explanations.
This document provides an introduction to basic programming concepts including programs, programming, programming languages, and careers in programming.
A program is a series of organized instructions that directs a computer to perform tasks. Programming involves creating a set of commands that direct a computer. Programming languages allow humans to communicate with computers through using words, symbols, and codes. There are many programming languages with different rules. Careers in programming include programmer, programmer analyst, computer scientist, and software engineer.
The document outlines the steps to develop a basic math operations program in Visual Basic to help the programmer's younger brother learn addition, subtraction, multiplication, and division. The program will take two integer numbers as input, allow the user to select an operation, perform the calculation, and display the output. The development phases include problem analysis, program design with pseudo code and flowchart, coding the formulas, testing and debugging, and documentation.
Modular programming involves breaking large programs into smaller modules or blocks. Each module performs a single, well-defined task and has defined inputs and outputs. Modules can be reused across multiple programs, making programs easier to debug. Languages like Modula-2 were designed to support modular programming, which later evolved into object-oriented programming. The document then discusses the basic attributes and control relationships of modular programming, as well as module design requirements and types of communication between modules.
This document provides an introduction to computing concepts such as computers, programming, and algorithms. It defines a computer as a device that can perform vast calculations quickly. The basic components of a computer system are described as the input, output, storage, central processing unit (CPU), arithmetic logic unit (ALU), and control unit. Programming is defined as the process of writing instructions for a computer to perform tasks, and why learning it is important. Programming languages allow humans to communicate with computers through language-like structures. The skills needed for programming include proficiency with programming languages, problem-solving abilities, and developing algorithms. Algorithms are then introduced as step-by-step processes to solve problems, and different ways to represent algorithms like
The document discusses various aspects of system development including programming languages, paradigms, and software development lifecycles. It describes the key characteristics of programming languages including syntax and semantics. It also outlines the main programming paradigms - imperative, object-oriented, logic, and functional. The document then discusses software design paradigms such as design patterns, components, architecture, and frameworks. It provides an overview of common software development lifecycles including build and fix, waterfall, and spiral models.
This document discusses computer programming languages and number systems. It begins by defining programming languages and categorizing them into machine language, assembly language, and high-level languages. It then covers number systems used in computers like binary, octal, hexadecimal, and decimal. Binary arithmetic operations like addition, subtraction, multiplication, and division are explained. Negative numbers in binary are also discussed.
The document describes a book titled "C Programs with Solutions" by S. Anandamurugan. The book provides a rich collection of C programs with solutions to support theoretical concepts. It is intended to help students of engineering and computer science understand C programming concepts better. The book covers fundamental C concepts, introduction to C programming, sample programs, debugging techniques, sample questions and answers.
The document provides an overview of software programming and development. It defines key concepts like software, hardware, programming languages, compilers, interpreters, and algorithms. It discusses low-level languages like machine code and assembly, and high-level languages like C/C++, Java, and .NET. It also explains the planning process for computer programs using algorithms, flowcharts, and pseudocode and the differences between compilers and interpreters. The document aims to introduce foundational topics in software engineering.
This document describes a summer internship project called "Graphical Interpreter: Buddhuram Dumbo in Action" conducted at IIT Bombay. The project involved developing a graphical interpreter application to allow students to input C code and observe how it is executed step-by-step. Key components of the application included a parser to tokenize the input code, graphical interface functions to generate animations, and modules to handle I/O, memory representation, and error handling. The goal was to help students better understand basic computer architecture concepts through interactive experimentation with code execution.
The document provides an overview of the C programming language, including its history, characteristics, and structure. It discusses how C was developed in the 1970s at Bell Labs to program the UNIX operating system. It also summarizes key aspects of C like it being a middle-level language suitable for both systems and applications programming, its use of control structures for selection, repetition and loops, and its portability across operating systems.
This document provides an introduction to computer programming and programming languages. It discusses what programming is, the history and evolution of programming languages from machine languages to higher-level languages. It describes assembly languages, third-generation languages like Java and C++, fourth-generation languages, and debates the existence of fifth-generation languages. The document also discusses Java in more detail, including its history, editions, features, environment, and common misconceptions. It provides an example of a simple "Hello World" Java program.
The document provides information about database objects in Microsoft Access, including queries, forms, and reports. It defines queries as objects that retrieve specific information from a database. Forms allow users to add, modify, and view information from tables or queries. Reports summarize information from the database for printing purposes. The document discusses how to create and use these different database objects.
The document provides information on data, information, and information systems. It defines data as raw unorganized material that has little value on its own. Information is organized data that is meaningful to a user. An information system is a set of related components that collects data, processes it, and provides information. It gives examples of information systems used in education like learning management systems, and information systems used in business for online shopping, transportation, and hotel booking.
The document discusses the concept of multimedia, defining it as the presentation of information using a combination of text, audio, graphics, video, and animation. It provides examples of how multimedia is used in various aspects of life, such as in business, entertainment, and education. The document also examines key elements of multimedia like hardware, software, file formats, and how authoring tools can be used to integrate different multimedia elements into interactive applications.
A multimedia production team consists of various roles including a project manager, subject matter expert, graphic artist, audio/video technician, instructional designer, and programmer. The project manager defines the project scope and coordinates the team. Each role contributes different elements - the subject matter expert provides content, the graphic artist develops visual elements, the audio/video technician records and edits sound/video, the instructional designer plans educational strategies, and the programmer codes the program. The team goes through various phases from analysis to design, implementation, testing, evaluation, and publishing to produce high-quality multimedia applications.
This document provides information about computer security and threats. It discusses defining computer security, types of security including hardware, software/data, and network security. It also covers computer threats such as malicious code like viruses, Trojan horses, logic bombs, and worms. Additional threats discussed are hackers, natural disasters, theft, and security measures to protect against these threats like data backup, cryptography, antivirus software, anti-spyware, and firewalls.
Primary storage refers to the internal memory of a computer, including RAM and ROM. RAM (random-access memory) allows for reading and writing of data during processing but is volatile and loses data when power is turned off. ROM (read-only memory) holds programs and data non-volatily but only allows for reading. Primary storage is directly accessible by the CPU and stores instructions and data currently being processed. Larger and more complex programs/functions are placed in primary storage.
Utility programs perform maintenance tasks related to managing computers and their systems. Examples of utility programs include file managers, which allow users to organize and manage files; diagnostic utilities, which compile system information to identify and help resolve problems; and disk defragmenters, which optimize how files are physically stored on a disk to improve performance. Other common utilities include backup programs, which copy files and system data as a safeguard, as well as smaller utilities like image viewers, firewalls, uninstallers, and screen savers.
The document discusses computer networks and communications. It defines a computer network as a system that connects interconnected computers and devices to share information and resources. It describes the different types of networks including local area networks (LANs), metropolitan area networks (MANs), and wide area networks (WANs). It also explains the basic components, hardware, and software needed for networks and communications to function properly.
1. ICT refers to technologies used for information processing, including computers, communication devices, and software.
2. Communication has evolved significantly with technology, from early forms like writing and speech to modern devices like phones, TV, and the internet.
3. Computers have advanced through five generations from vacuum tubes to integrated circuits and microprocessors, becoming smaller and more powerful over time.
Ringkasan dokumen tersebut adalah sebagai berikut:
Dokumen tersebut membahas tentang perjanjian Aqabah Kedua, hijrah Nabi Muhammad s.a.w. ke Madinah, dan pembentukan negara Islam pertama di bawah kepemimpinannya.
Islam mempengaruhi perkembangan bahasa dan kesusasteraan Melayu di Asia Tenggara. Tulisan jawi menjadi tulisan rasmi, sementara bahasa Melayu menjadi bahasa pentadbiran dan perdagangan (lingua franca). Gaya dan tatabahasa bahasa Melayu dipengaruhi Arab, sementara kesusasteraan Melayu mengambil bentuk sastera Islam.
Dokumen tersebut membahas tentang Diagram Arus Data (DFD) yang berguna untuk merancang dan mendokumentasikan sistem informasi. DFD menggambarkan komponen sistem, aliran data antar komponen, dan asal serta tujuan data. Dokumen tersebut juga menjelaskan fungsi dan komponen DFD seperti simbol-simbolnya beserta konsep-konsep aliran data.
Dokumen tersebut membahas metode greedy dalam penyelesaian masalah optimasi. Metode ini mengambil keputusan secara lokal di setiap langkah untuk mencapai solusi global yang optimal. Beberapa contoh masalah yang dapat diselesaikan dengan metode ini adalah optimal storage, knapsack problem, minimum spanning tree, dan shortest path problem.
Sistem operasi Unix adalah sistem operasi pertama yang dikembangkan pada laboratorium Bell dan memiliki fitur multiuser, multitasking, dan portabilitas. Dokumen ini menjelaskan sejarah, komponen perangkat keras dan lunak, serta operasi dasar Unix seperti login, logout, manajemen file dan direktori, serta pengaturan akses file.
This document provides an introduction to basic programming concepts including programs, programming, programming languages, generations of programming languages, and translators.
The key points covered are:
1) A program is a series of organized instructions that direct a computer to perform tasks. Programming is the creation of a set of commands that direct a computer to carry out a task.
2) Programming languages allow humans to communicate with computers. Examples of programming languages mentioned include BASIC, Pascal, C, and Smalltalk.
3) Programming languages have evolved through generations from machine language (1st generation) to assembly language (2nd generation) to high-level languages like BASIC, Pascal, and C (3
This document provides an introduction to basic programming concepts including programs, programming, programming languages, and careers in programming.
A program is a series of organized instructions that directs a computer to perform tasks. Programming involves creating a set of commands that direct a computer. Programming languages allow humans to communicate with computers through words, symbols, and codes. There are many programming languages with different rules. Careers in programming include programmer, programmer analyst, computer scientist, and software engineer.
This document provides an overview of programming and programming languages through a series of lessons:
1. It defines what a program and programming are, and compares a program to a recipe.
2. It discusses different generations of programming languages from machine language to modern languages like C++, and the roles of compilers, interpreters, and assemblers.
3. It covers structured and object-oriented programming approaches, pseudo code, basic programming elements like variables and data types, and mathematical and logical operators.
4. It provides examples of programming languages like Visual Basic and how to install Visual Basic 6.0.
Programming involves writing computer code to solve problems by implementing algorithms. A program is a set of instructions that a computer follows to perform a task. A programmer writes computer software and applications using specific programming languages. There are different programming methodologies and languages. Procedural languages specify the steps to solve a problem using variables, conditions, and functions. Functional programming uses pure mathematical functions and expressions instead of statements. Structured programming facilitates creating programs with readable code and reusable components. Modular programming separates program functionality into independent and interchangeable modules.
The document discusses the basic concepts of programming including defining a program and programming language, levels of programming languages from low-level to high-level, common programming elements like variables and data types, and the key phases of program development from problem analysis to documentation.
The document provides an introduction to programming languages. It discusses the different levels of programming languages including low-level languages like machine language and assembly language that are close to hardware, and high-level languages like C++, Java, and Python that are more abstract. It also covers procedural languages which specify steps to complete tasks and object-oriented languages which model real-world objects. Examples are given of popular languages from each paradigm like C, Pascal, and PHP for procedural and C++, Java, Ruby for object-oriented.
Programming languages allow humans to communicate instructions to computers. There are many programming languages that differ based on their level, model, and intended applications. Low-level languages like machine language and assembly language use binary codes and mnemonics that closely match the computer's architecture, making programs fast but difficult for humans. Higher-level languages have more abstract constructs that are translated into machine code, making programs easier for humans to write but slower to execute. Programming languages continue to evolve to balance expressiveness for programmers with efficiency of execution.
The document discusses basic programming concepts including definitions of programs and programming languages. It describes the generations of programming languages from first to fifth generation with examples. It also explains structured and object-oriented programming approaches, differentiating between them. Structured programming uses a top-down design model while object-oriented programming combines data and functions to create objects.
The document is a lesson plan on basic programming concepts that:
1) Defines a program as a series of organized instructions that direct a computer to perform tasks, and defines a programming language as a set of words, symbols, and codes that allows humans to communicate with computers.
2) Discusses five generations of programming languages from first to fifth generation and provides examples such as BASIC, Pascal, C, and Smalltalk.
3) Compares structured programming and object-oriented programming, noting that structured programming uses a top-down design model while object-oriented programming combines data and functions into objects.
This document provides an overview of object-oriented programming concepts and the Java programming language. It discusses the basic syntax of Java, including classes, objects, methods, and variables. It also covers Java data types, operators, and expressions. The document is part of a course on applying object-oriented programming language skills and includes self-check questions for students.
Programming involves writing computer programs and algorithms using programming languages. There are different types of programming languages from low-level machine languages close to hardware to high-level languages that are more abstract. Popular programming paradigms have evolved over time like structured programming, modular programming, object-oriented programming, and declarative programming to help manage complex programs. The most commonly used programming languages today include Java, Python, and JavaScript.
The document discusses computer programming and provides details about:
- The process of programming which involves analysis, algorithm development, coding, and testing
- Common programming languages like C, C++, Java, and Python
- The roles of programmers and the different phases of programming like planning, coding, testing, and documentation
- Key aspects of programming like reliability, robustness, usability, portability, and maintainability
The document discusses computer programming and provides details about:
- The process of programming which involves analysis, algorithm development, coding, and testing
- Common programming languages like C, C++, Java, and Python
- The roles of programmers and the different phases of programming like planning, coding, testing, and documentation
- Key aspects of programming like reliability, robustness, usability, portability, and maintainability
A Short Communication On Computer Programming Languages In Modern EraKatie Naple
This document provides an overview of computer programming languages throughout history. It discusses how programming languages have evolved from machine languages to modern high-level languages. Key points include:
1) Programming languages have developed from low-level machine languages and assembly languages to modern high-level languages to simplify programming and communication between humans and computers.
2) Popular modern languages include C++, Java, Python, and JavaScript, which are often used to build web applications.
3) Programming languages continue to be developed to meet new needs, such as languages for scientific computing, business applications, education, and more specialized domains.
The document discusses different types of computer programming languages including machine language, assembly language, high-level languages, and object-oriented programming. It provides examples of some specific programming languages such as BASIC, HTML, Java, C++, FORTH, and LOGO. It also discusses key computer science concepts related to programming languages such as interpreted languages, compiled languages, authoring languages, and machine code.
Visual programming (pemrograman visual) adalah pendekatan dalam pemrograman komputer yang memungkinkan pengguna untuk membuat program melalui antarmuka grafis yang intuitif dan mudah digunakan. Dalam pemrograman visual, pengguna menggambar diagram atau ikon yang merepresentasikan operasi atau fungsi yang ingin dilakukan oleh program, lalu menghubungkannya dengan garis atau panah untuk membentuk alur logika.
Pemrograman visual memiliki beberapa keuntungan dibandingkan dengan pemrograman teks tradisional. Pertama, pemrograman visual lebih mudah dipelajari oleh pemula karena antarmuka grafis yang intuitif. Kedua, pemrograman visual dapat membantu pengguna memvisualisasikan alur program secara keseluruhan, sehingga memudahkan pengguna untuk memahami bagaimana program bekerja. Ketiga, pemrograman visual dapat mempercepat proses pengembangan program karena menghilangkan kebutuhan untuk mengetik kode secara manual.
Contoh dari bahasa pemrograman visual termasuk Scratch, Blockly, dan LabVIEW.
Introduction Programming and Application Lecture 1.pptxMahamaHaruna
This document provides an introduction to computer programming fundamentals. It discusses how programming languages allow humans to give instructions to computers and how these languages get translated into binary for the computer to understand. It describes low-level languages that are closer to binary and relate to specific hardware, and high-level languages that are more like human languages and portable. Examples of assembly language and common high-level languages are given. The document also briefly explains the role of translators in converting source code into executable machine code.
The document discusses the generations of programming languages. It identifies the five generations as:
1) First generation: Machine language using binary code.
2) Second generation: Assembly language using mnemonics to represent machine code.
3) Third generation: High-level procedural languages like Pascal, FORTRAN, and C that are closer to human language.
4) Fourth generation: Non-procedural languages focused on accessing databases, like SQL.
5) Fifth generation: Natural languages that allow visual or spoken interaction with computers.
Want to know how programming works? how it helps the human being with their everyday work? well you can easily find the answers to those questions that are in your minds. Programming, well it is a kind of software that can make games, applications, movies and a lot more. For a start, programming can help us students with our home works and such stuffs. and now, we can learn more about the different languages used in programming, program life cycle, rules and symbols used and its level. Let us discover how programming works!
SOALAN ULANGKAJI SPM 2014 :
1.BM
2.BI
3.MATH
4.SEJARAH
5.SAINS
6.ADD MATH
7.FIZIK
8.KIMIA
9.BIO
10.P.PERAKAUANAN
11.PERDAGANGAN
* 1.untuk dapatkan skema jawapan sila layari
http://e-learningsmktsj2.blogspot.com/
2.Cari nama folder ULANGKAJI SPM 2014 pada box MUAT TURUN BAHAN bahagian paling bawah post dan klik download.
The document contains repeated headings for different types of maps including "PETA BULATAN", "PETA BUIH BERGANDA", "PETA POKOK", "PETA ALIR", "PETA PELBAGAI ARAH", "PETA TITI", and "PETA DAKAP", suggesting it is providing information on or examples of different kinds of maps.
Majlis perutusan tahunan Menteri Pendidikan membahas pencapaian Kementerian Pendidikan pada tahun 2013 termasuk program transformasi daerah, peningkatan literasi dan numerasi melalui LINUS, pelibatan ibu bapa dan komuniti, pendidikan teknikal dan vokasional, serta pendidikan khas.
This document provides advice on being grateful for what you have rather than complaining. It notes that while people may worry about school, diets, games or chores, others have it much harder without choices or privileges. It encourages taking time to thank God for blessings like health, family, friends and more. Finally, it asks the reader to remind themselves to ask less and be thankful more, suggesting they pass this message on.
Cara menulis pendahuluan karangan dengan menggunakan teknik faclksmktsj2
Dokumen tersebut memberikan panduan tentang teknik FACLK (Fokus, Akibat, Contoh, Langkah, Kepentingan) untuk membangun pendahuluan karangan SPM secara efektif. Teknik ini melibatkan penulisan ayat pertama tentang fokus soalan, diikuti akibat, contoh, langkah, dan kepentingan. Contoh pendahuluan menggunakan teknik ini juga diberikan untuk dua soalan berbeza. Guru menekankan penting
This document provides background information on the novel Around the World in 80 Days by Jules Verne. It discusses Verne's background as the father of modern science fiction and how he anticipated many future inventions in his novels. It also summarizes the background of the reteller, Ms. Deanna McFadden, who worked as an author and freelance writer focusing on rewriting classics. The document serves as an introduction for teachers and students to understand the origins and context of the novel.
1. Melindungi masa instruksional merupakan usaha penting untuk memastikan pembelajaran berlangsung secara berkesan di sekolah dengan mengurangkan gangguan.
2. Ia perlu dirancang oleh pemimpin sekolah dan guru untuk mengoptimumkan masa pengajaran dan pembelajaran murid.
3. Matlamatnya adalah untuk meningkatkan keberhasilan pembelajaran murid.
1. Melindungi masa instruksional penting untuk memastikan pembelajaran berlangsung secara berkesan di sekolah dengan mengurangkan gangguan.
2. Faktor pengurusan sekolah dan faktor instruksional guru perlu diperbaiki untuk meningkatkan masa pembelajaran murid.
3. Matlamat melindungi masa instruksional adalah untuk memberikan peluang pembelajaran yang optimum kepada murid.
Jadual kursus TOT MMI memberikan maklumat tentang jadual slot kursus pada pagi dan petang serta bengkel yang diadakan pada petang. Bengkel dibahagikan kepada 4 kumpulan yang akan mengerjakan pelan tindakan sekolah, mengenal pasti isu dan cadangan penyelesaian mengenai MMI, serta memberikan respon terhadap pelaksanaan MMI di sekolah. Cadangan taklimat kepada pengetua dan GPK1 pada Disember untuk membinc
1. High School B. Mertajam
BASIC PROGRAMMING CONCEPT
LESSON 1
PROGRAM AND PROGRAMMING
PROGRAM
A computer program is a series of organised instructions that directs a
computer to perform tasks. Without programs, computers are useless.
A program is like a recipe. It contains
a list of variables (called ingredients)
and a list of statements (called
directions) that tell the computer what
to do with the variables.
Like a recipe, a program can be
written in different programming
languages which may express the
steps differently according to the
programming language syntax, but
deliver the same end result.
PROGRAMMING
Programming is a creation of a set of
commands or instructions which directs a
computer in carrying out a task.
Later these commands or instructions will be
compiled and/or interpreted and then
transformed to executable instructions that
a computer or electronic device can execute
or run.
1
2. High School B. Mertajam
PROGRAMMING LANGUAGE
A programming language is a set of words, symbols
and codes that enables humans to communicate with
computers.
It is a language used for writing computer
programs, that direct a computer to perform
computation and to organise the flow of control
between mechanical devices.
EXAMPLES PROGRAMMING LANGUAGE
Hundreds of programming languages exist today.
Each language has its own standard or rules for
writing the commands and/or instructions.
Examples of programming languages are:
BASIC (Beginner’s All Purpose Symbolic
Instruction Code)
Pascal
C
Smalltalk.
EXT: CAREER IN PROGRAMMING
A programmer is someone who writes computer programs. One who adopts
and practices a formal approach to programming is sometimes also referred
to as a programmer analyst, computer scientist, software engineer and
software analyst.
A programmer analyst designs computer programs besides writing them.
A computer scientist is a generic or broad term for a professional with
expertise in computer software.
These different job titles are quite subjective as
different companies may define them differently.
Professional programmers may work in corporate
IT departments, software houses and service
companies.
Sometimes professional programmers work for
consulting companies and their work often takes
them to their client’s workplace.
2
3. High School B. Mertajam
LESSON 2
GENERATIONS OF PROGRAMMING LANGUAGE
A low-level programming language is a programming language that provides
little or no abstraction from computer’s microprocessor.
A high-level programming language is a programming language that is more
abstract, easier to use, and more portable across platforms.
LEVELS OF PROGRAMMING LANGUAGE
3
4. High School B. Mertajam
FIRST GENERATION OF PROGRAMMING
LANGUAGE
The first generation of programming
language, or 1GL, is machine language.
Machine language is a set of instructions
and data that a computer’s central
processing unit can execute directly.
Machine language statements are written
in binary code, and each statement
corresponds to one machine action.
SECOND GENERATION PROGRAMMING
LANGUAGE
The second generation programming language, or 2GL,
is assembly language. Assembly language is the
human-readable notation for the machine language
used to control specific computer operations.
An assembly language programmer writes instructions
using symbolic instruction codes that are meaningful
abbreviations or mnemonics.
An assembler is a program that translates assembly
language into machine language.
Since assembly language consist of human-readable abbreviations, the
assembler must first convert assembly language into machine-readable
language before the computer can readily understand its instructions.
4
5. High School B. Mertajam
THIRD GENERATION PROGRAMMING
LANGUAGE
The third generation of programming language, 3GL, or procedural language
uses a series of English-like words, that are closer to human language, to
write instructions.
High-level programming languages make complex programming simpler and
easier to read, write and maintain. Programs written in a high-level
programming language must be translated into machine language by a
compiler or interpreter.
PASCAL, FORTRAN, BASIC, COBOL, C and C++ are examples of third
generation programming languages.
FOURTH GENERATION PROGRAMMING
LANGUAGE
The fourth generation programming language or non-
procedural language, often abbreviated as 4GL,
enables users to access data in a database.
A very high-level programming language is often
referred to as goal-oriented programming language
because it is usually limited to a very specific
application and it might use syntax that is never used
in other programming languages.
5
6. High School B. Mertajam
SQL, NOMAD and FOCUS are examples of fourth generation programming
languages.
FIFTH GENERATION PROGRAMMING
LANGUAGE
The fifth generation programming language or visual programming
language is also known as natural language.
Provides a visual or graphical interface, called a visual programming
environment, for creating source codes.
Fifth generation programming allows people to interact with computers
without needing any specialised knowledge.
People can talk to computers and the voice recognition systems can convert
spoken sounds into written words, but these systems do not understand what
they are writing; they simply take dictation.
Prolog and Mercury are the best known fifth-generation languages.
6
7. High School B. Mertajam
EXT: OPEN PROGRAMMING LANGUAGE
The Open Programming Language (OPL) is
an embedded programming language found
in portable devices that run the Symbian
Operating System.
For example mobile telephones and PDAs.
OPL is an interpreted language that is
analogous to BASIC.
In the early years, before the computer
was invented, there are several inventions
of counting machines.
LESSON 3
PROGRAMING APPROACHES
STRUCTURED PROGRAMMING EDUCATION
Structured programming often uses a top-down design model where
developers map out the overall program structure into separate subsections
from top to bottom.
In the top-down design model, programs are drawn as rectangles. A top-
down design means that the whole program is broken down into smaller
sections that are known as modules. A program may have a module or
several modules.
7
8. High School B. Mertajam
Structured programming is beneficial for organising and coding computer
programs which employ a hierarchy of modules. This means that control is
passed downwards only through the hierarchy.
Examples of structured
programming languages
include Ada, Pascal and
Fortran.
OBJECT-ORIENTED PROGRAMMING
The object-oriented approach refers to a special type of programming
approach that combines data with functions to create objects.
In an object-oriented program, the objects have relationships with one
another.
One of the earliest OOP languages is
Smalltalk. Java, Visual Basic and C++
are examples of popular OOP
languages.
8
9. High School B. Mertajam
DIFFERENCE BETWEEN STRUCTURED AND
OBJECT ORIENTED PROGRAMMING
Structured programming often uses a top-down design model.
The object-oriented programming approach uses objects.
LESSON 4
TRANSLATOR
Sometimes two people cannot understand each other because they don’t
speak the same language. So they need the help of a third person who
understands both languages. This third person is known as a translator.
All software packages or programs are written in high-level languages, for
example, C++, Visual Basic and Java.
However, in order for the computer to be able to carry out the instructions,
the high-level languages must be translated into machine language before
the computer can understand and execute the instructions in the program.
The translation of high level languages to machine language is performed by
a translator.
PROGRAM
Have you ever wondered how your computer runs your favourite software?
Your favourite software is a program that consists of several instructions
that perform its operation.
9
10. High School B. Mertajam
A programmer will write a source code which consists of the instructions
needed to run a program. Then the compiler or interpreter with assembler
will translates the source code into machine language which is made of a
sequence of bits (e.g. 01100011).
The computer will load the machine code and run the program.
ASSEMBLER
An assembler is a computer program for translating assembly language —
essentially, a mnemonic representation of machine language — into machine
language.
For example in Intel 80836, the assembly language for the ‘no operation‘
command is NOP and its machine code representation is 10010000.
Examples of assemblers are MACRO-80 Assembler and Microsoft MASM.
INTERPRETER
Interpreter is used to interpret and execute
program directly from its source without
compiling it first.
The source code of an interpreted language is
interpreted and executed in real time when the
users execute it.
The interpreter will read each code converts it to
machine code and executes it line by line until the
end of the program.
Examples of interpreter-based language are
BASIC, Logo and Smalltalk.
10
11. High School B.
COMPILER Mertajam
The source code (in text format) will be
converted into machine code which is a file
consisting of binary machine code that can be
executed on a computer.
If the compiler encounters any errors, it
records them in the program-listing file.
When a user wants to run the program, the
object program is loaded into the memory of
the computer and the program instructions
begin executing.
A compiled code generally runs faster than
programs based on interpreted language.
Several programming languages like C++,
Pascal and COBOL used compilers as their
translators.
LESSON 5
HOW TO INSTALL VISUAL BASIC 6.0
VISUAL BASIC 6.0 INSTALLATIONS
Microsoft Visual Basic 6.0 was designed to be easy to learn and use. The
language not only allows programmers to easily create simple GUI
applications, but also has the flexibility to develop fairly complex applications
as well.
Programming in Microsoft Visual Basic 6.0 is a combination of visually
arranging components or controls on a form. Hence a simple program can be
created without the programmer having to write many lines of code.
VISUAL BASIC 6.0 FEATURES
Microsoft Visual Basic is fast and easy with intuitive tools that enable you to
rapidly build your own Windows applications. You can use Microsoft Visual
Basic to develop programs such as games, calculator, phonebook database
and lots more.
The word “Visual” refers to the technique used to build the Graphical User
Interface (GUI). Visual Basic features an easy “drag and drop” method to
produce an interactive Graphical User Interface (GUI) for your program.
11
12. High School B. Mertajam
The “Basic” part refers to the BASIC (Beginners All-Purpose Symbolic
Instruction Code) language, a high level programming language develop by
Microsoft.
VISUAL BASIC 6.0 FEATURES
Among the main features of Visual Basic are
drag and drop user interface, data access
features, ActiveX technologies and internet
capabilities.
Drag and drop user interface allows you to
instantly create an interactive user interface
for your software without dozens of codes.
Data access features allow your application to access information from a
database such as a telephone book program.
ActiveX technologies allow you to make use of the functionality provided by
other applications.
Internet capabilities allow your program to interactively utilise the Internet.
12
13. High School B. Mertajam
LESSON 6
BASIC ELEMENT IN PROGRAMMING
5 Basic elements in programming.
1. Constant.
2. Variable.
3. Data Type.
4. Operators.
5. Control Structures.
CONSTANTS AND VARIABLES
Constants
Constant is a data container that stores information. The value will never
change (remains constant) at any time during the course of a program.
Declare is the official term used in programming to announce to the program
the condition of statement in programming.
Variables
Variable is a data container that stores information. The value inside may
change at any time during the course of a program.
13
14. High School B. Mertajam
DATA TYPES, OPERATOR AND
CONTROL STRUCTURES
14
15. High School B. Mertajam
LESSON 7
CONSTANTS AND VARIABLES
CONSTANTS AND VARIABLES
Constant is a virtual data container that stores information. The value will
never change (remains constant) at any time during the course of a
program.
Variables is a virtual data container that stores information. The value
inside may change at any time during the course of a program.
DIFFERENCES BETWEEN CONSTANTS
AND VARIABLES
15
16. High School B. Mertajam
LESSON 8
RIGHTS DATA TYPES
DATA EXAMPLES FOR DIFFERENT DATA TYPES
Data type determines the type
of data a variable can store,
for example a number or a
character.
Examples of data types are
integer, double, string and
Boolean.
16
17. High School B. Mertajam
DATA EXAMPLES FOR DIFFERENT DATA TYPES
Integer
Integer data type contains any whole number value that does not have any
fractional part.
This is how we declare an integer type constant in Visual Basic statement.
This is how we declare an integer type variable in Visual Basic statement.
Double
Any number value that may and could contain a fractional part.
This is how we declare a double type constant in Visual Basic statement.
This is how we declare a double type variable in Visual Basic statement.
String
Any value that contains a sequence of characters.
This is how we declare string type constant in Visual Basic statement.
This is how we declare string type variable in Visual Basic statement.
17
18. High School B. Mertajam
Boolean
Boolean type consists either a True or False value. Programmers usually use
it to store status.
This is how we declare a Boolean type constant in Visual Basic statement.
This is how we declare a Boolean type variable in Visual Basic statement.
OTHER DATA TYPES
18
19. High School B. Mertajam
LESSON 9
MATHEMATICAL AND LOGICAL OPERATORS
MATHEMATICAL, RELATIONAL AND
LOGICAL OPERATORS
Operator is a symbol or notation that tells a computer to perform certain
actions or operations.
An example: the plus (+) notation will tell the computer to perform the
“add“operation.
Let’s look at some examples of Mathematical Operators.
19
20. High School B. Mertajam
Let’s look at some examples of Relational Operators.
20
21. High School B. Mertajam
Let’s look at some examples of Logical Operators.
FUNCTION OF MATHEMATICAL OPERATORS
Mathematical operators are notations that tell the
computer to perform mathematical operations.
FUNCTIONS OF RELATIONAL OPERATORS
Relational operators perform comparison between
two elements.
They return an element of logical 1 (True) where the relation is true and
element of logical 0 (False) where the relation is false.
The diagram shows some common relational operators and their expression.
21
22. High School B. Mertajam
Let’s understand a relational operation with the following examples.
In this expression, A >= B is
used to test if the value of left
expression (A) is greater than
or equal to that of the right
expression (B).
If the conditions are met, then
the program will return a logical
1 and proceed to print “A is
greater than or equal to B“else
it will return a logical 0 and
proceed to print “A is less than
B“.
FUNCTIONS OF LOGICAL OPERATORS
Logical operators are notations that tell the computer to perform logical
operations.
Examples of Logical operation are: AND, OR, and NOT.
Logical operator compares 2 conditions and returns a TRUE or FALSE value.
22
23. High School B. Mertajam
AND operator
The diagram shows a truth table of AND operator.
Notice that truth value of X AND Y is True (1) if
only both X and Y are True (1).
Else it is false (0)
OR operator
The diagram shows a truth table of OR operator.
Notice that truth value of X OR Y is only True (1)
if either X or Y are True (1) or both X and Y are
true (1)
Else it is false (0)
NOT operator
The diagram shows the truth table of NOT
operator NOT X is the negation of X; it is
essentially the 1’s complement operation.
Notice that truth value of NOT X is True
(1) when X is False and vice versa.
23
24. High School B. Mertajam
DIFFERENCES IN MATHEMATICAL AND
LOGICAL OPERATORS
As we have learned, there are some
differences between mathematical,
relational and logical operators.
Function:
Mathematical operators perform mathematical
operations such as plus or subtract.
Relational operators perform element-by-element
comparisons between two
arrays.
Logical operators perform logical operations such as
checking the condition of two Boolean values.
24
25. High School B. Mertajam
Symbols:
These operators have their own symbols based on the programming
language.
EQUALITY OPERATORS
The equality determine an operand equal to or
not equal to another operand.
Remember we must use “=“and not “<>“when
testing if two primitive values are equal in
Microsoft Visual Basic 6.0.
LESSON 10
PSEUDO CODES
Pseudo code is text only sentences that
describe the logic and program flow of a
computer program. Pseudo code
assembles plain English.
It usually does not have any specific
programming language syntax and
grammar.
Pseudo code is directly linked to the
computer codes because each pseudo
code statement can often be converted
into the programming language virtually
line by line.
25
26. High School B. Mertajam
There are no set rules for writing pseudo code.
A programmer can have his or her personalised pseudo code.
He or she must use consistent language and syntax in the pseudo code, so
that he or she can understand it at a later stage.
AN EXAMPLE PROGRAM BASED ON A
PSEUDO CODE
EXT: STANDARDS OF GOOD PSEUDO CODE
Pseudo-Code is simply a numbered list of instructions to perform some task.
In this course we will enforce three standards for good pseudo code
Number each instruction. This is to enforce the
notion of an ordered sequence of the operations.
Furthermore we introduce a dot notation (e.g. 3.1
come after 3 but before 4) to number subordinate
operations for conditional and iterative operations
Each instruction should be unambiguous and
effectively computable.
Completeness. Nothing is left out.
26
27. High School B. Mertajam
Pseudo-code is best understood by looking at examples.
Each example below demonstrates one of the control structures used in
algorithms: sequential operations, conditional operations, and
iterative operations.
We also list all variables used at the end of the pseudo-code.
Example:
Computing discount:
Pseudo-code:
Computing the final price of an item
after figuring in discount.
Note the three types of
instructions:
input (request),
process/calculate (=) and
output (print)
27
28. High School B. Mertajam
LESSON 11
FLOW CHART
Let’s identify some of the main elements in the flow chart. We have five
main elements in a flow chart.
Terminator shows the beginning or end
of a program.
Flowline and arrowhead use to connect
symbols and indicate the sequences of
operation.
Input or output shows either an input
operation (e.g. an INPUT from the
user) or an output operation (e.g. PRINT
some messages).
Process shows a process to be carried
out (e.g. calculation).
Decision shows a decision (or choice) to
be made. The program should continue
along one of two routes (e.g. if...else).
A flow chart is a diagram using symbols to show the step-by-step sequence
of procedures in a program. A flow chart describes the logic and program
flow of a computer program graphically.
Example:
A student requests his marks from
the program.
The program will then check whether
his marks is more/equal to 50 or
not.
If the marks are over or equal to 50,
the program will print a
congratulatory message together
with the marks.
If the marks are lower than 50 then
the program will print a motivational
message together with the result.
28
29. High School B. Mertajam
LESSON 12
CONTROL STRUCTURES
Control structure is a structure of statements in programming that allows
the programmer to control the flow of a program.
Control structure can be divided
into sequence, selection and
repetition control structures.
SEQUENCE CONTROL
Sequence control refers to the linear execution of codes within a program. In
sequence control, the statements are executed one by one in consecutive
order.
In sequence control, the statements are
executed one by one in consecutive order.
29
30. High School B. Mertajam
Let’s see an example of pseudo code that has sequence control
structure.
This program will request the user’s
date of birth and then request today’s
date, calculate the age and finally will
print the user’s age.
For example, today’s date is 1-JAN-
2006, then the results will be shown as
follows:
Let’s see another example of pseudo code that has sequence control
structure.
The following is the result of the
example.
Let’s see the flow chart for a general sequence control
structure.
As we can see, the flow chart for sequence control is very
simple.
It will execute statement 1 followed by statement 2 and any
following statements.
30
31. High School B. Mertajam
EXAMPLE
The flow chart represents a program
that will request the user’s date of
birth and then request today’s date,
calculate the age and finally will display
the user’s age.
SELECTION CONTROL
There are times when you want your program to make a decision based on
the situation given.
For example, a program that stores student’s
marks may respond differently to different
marks.
Or maybe a simple mathematical program will
display its result as odd or even, based on the
result.
Selection control enables the programmer to
assign different events for different situations.
An example of selection control is “If...Then...Else” statement. The basic
pseudo code for “If...Then...Else” statement is as follows.
Let’s see a pseudo code
example for the
“If...Then...Else” statement
for a program that will print
“You are too heavy to ride
the toy car” if the student’s
weight is more than or
equal to 50.
Otherwise it will print “You can ride the toy car”
31
32. High School B. Mertajam
Let’s see the flow chart for a similar selection control example.
Let’s see a program that will
respond differently for different
service hours in a school library.
A student requests her service hours
in a library from the program, the
program will then check whether her
service hours are more than/equal
to 30 or not.
If the service hours are over or
equal to 30, the program will print a
message, “Thank you for your
service”.
If the service hours are lower than
30 then the program will print a
message, “Please continue to serve
in the library”.
Let’s write an example of a program that implements sequence
control structure.
This program will declare a constant
pi equal to 3.142. Then the program
declares two variables to be used in
the program (r and volume).
The program will then assign some
value to the r variable.
The program will then calculate the
volume using the formula volume =
(4/3) nr
The program will then display the
volume calculated with a message
box.
32
33. High School B. Mertajam
Now write an example program that implements selection control
structure.
Write a program that will retrieve the
current date from the system.
If today’s date is more than 15 then the
program will display a message box with
the message “We are towards the end of
the month”.
Else the program will print “We are at
the beginning of the month”.
DIFFERENTIATE BETWEEN SELECTION
CONTROL AND SEQUENCE CONTROL
33
34. High School B. Mertajam
EXT: REPETITION CONTROL STRUCTURES
Let’s learn about the last control structure which is repetition control
structure. A repetition control structure allows the programmer to specify an
action to be repeated while some condition remains true.
This is a pseudo code of “While“structure.
This program segment will continue its looping until the condition of variable
named product is greater than 3000.
This is a flow chart of a repetition control structure.
34