Q1 LG02 Programs, Programming Languages and Compilers.pdf

Full Transcript

Learning Module Subject Code CS2 Introduction to Computational Thinking Module Code 1.0 Introduction to Programming Lesson Code 1.2 Programs, Programming Languages and Compilers Time Frame 30 mins....

Learning Module Subject Code CS2 Introduction to Computational Thinking Module Code 1.0 Introduction to Programming Lesson Code 1.2 Programs, Programming Languages and Compilers Time Frame 30 mins. Actual Time Components Tasks Time Allocationa Allocationb Target By the end of this module, the students will be able to 1 min. 1. identify a program, programming language and a compiler 2. differentiate the types of programming language. 3. explain how a computer program works. Hook As you watch “Code Stars - Short Film” and ”What Most Schools 10 mins. Don’t Teach” , note some personalities’ thoughts about programming/computer science and how they learned about it If you do not have access to the internet, read the following quotes and “Everybody in this country should learn how to program a computer… because it teachers you how to think.” - Steve Jobs “Learning to write programs stretches your mind, helps you think better, and creates a way of thinking about things that I think is helpful in all domain.” - Bill Gates “In fifteen years we’ll be teaching programming just like reading and writing… and wondering why we did not do it sooner.” - Mark Zuckerberg “Computer science belongs in every public school, right next to biology, chemistry, or algebra” - Ashton Kutcher In the videos, children were asked what they wanted to be in the future and what they know about computer science. The videos also explained what programming is and showed what some famous personalities and CEOs say about programming and how they started learning and doing it. Below are the famous personalities included in the videos: Gave Newel - Valve Jack Dorsey - Twitter Bill Gates - Microsoft Mark Zuckerberg - Facebook Tony Hsieh - Zappos Drew Houston - Dropbox Will.i.am - Black Eyed Peas Chris Bosh - Miami Heat CS2 | Page 1 of 5 Ignite The Computer System 10 - 15 mins Before we understand what programming is, we must know first what a computer is. A computer is a device that can accept human instruction, process the data under the control of a computer program and respond to it. We all know that a computer has two component, hardware and software. Hardware is the tangible part. Software is the intangible part. Software is a set of programs that performs multiple tasks. For example, word processors are programs that we use to write letters, papers, and even books. All programs are written or created using certain programming languages. Software can be divided into three major types: system software, application software and utility software. System software is a type of software that controls the computer. One of the example under this is the operating system which is the first program that loads when we turn on a computer. 1. Operating System (OS) is a program that helps us in interacting with the computer system. 2. Language processor is a software program designed or used to perform tasks such as processing program code to machine code. There are three languages involved in the world of human-machine interaction: Machine Language, Assembly language, and High-level Language. Application software is a type of software that performs a specific task. Word processors, spreadsheets and games are example of application programs. There are two types of application software: General-purpose and specific-purpose software. Programs under general-purpose application software come as ready-built or ready to use programs, manufactured by software companies like Microsoft excel, VLC media player and Adobe Photoshop. Programs under specific purpose application software can be customized and are mostly used in real-time or business environment CS2 | Page 2 of 5 like Payroll Management System, Point-Of-Sale System and the likes. Programs under utility software are the one giving assistance or service to the users like antivirus software, disk defragmenter tools and the likes. A program is a set of instructions given to a computer to perform specific operation. Programs are written in a programming language. Programming Language is an artificial language used to write instructions. Computer Programming is the process of developing and implementing various sets of instructions for a computer to perform specific tasks. Programmers write instructions in various programming languages, some directly understandable by computers and others requiring translating steps. Hundreds of computer languages are being used today. These may be divided into three general types. 1. Machine Language - natural language of a computer. - provides program instructions in bits. 2. Assembly Language - these are the Low-Level Language (LLL), that forms a communication between machine language and general assembly level statements - uses mnemonics to represent the various machine language instruction. - have the same structure and set of command as machine language but enable the programmer to understand it. 3. High-level Language (HLL) - uses the English language as instructions. This type of language is the easiest to master and manipulate since it is used by humans in communicating with each other. Assembler is a program that translates an assembly language instructions into machine language. Compiler is a program that translates high-level language instructions into machine language in one go, thus the execution time is fast. Programming languages like C and C++ use compiler. Interpreter is also a program that translates high level language into machine language but line-by-line, thus the execution time is slow. Programming languages like Python, Java use interpreter. Hierarchy of Computer Language High level Language Assembly Language Machine Language Computer Hardware CS2 | Page 3 of 5 Most Popular Programming Language 1. C 2. Python 3. C++ 4. Java 5. SCALA 6. C# 7. R 8. Ruby 9. Go 10. Swift Navigate Using the following words, complete the diagram below to show its 5 mins relationship. Machine Language Compiler Low Level Language High Level Language C++ Program Programming Language Software Assembler Assembly Language COMPUTER Knot Summary of the lesson A computer is capable of performing computations and making logical decisions at speeds millions (even billions) of times faster than human being can. CS2 | Page 4 of 5 Any computer can directly understand only its own machine language, which generally consist of strings of numbers that instruct computers to perform their most elementary operations. Compilers translate high level language programs into machine language programs. High level languages (like c++) contain English words and conventional mathematical notations. C++ evolved from C, which evolved from two previous programming language BCPL and B. References Code.org (February 26, 2013). Code Stars - Short Film https://www.youtube.com/watch?v=dU1xS07N-FA Code.org (February 26, 2013). What Most Schools Don’t Teach https://www.youtube.com/watch?v=nKIu9yen5nc GeeksforGeeks. Introduction to programming languages https://www.geeksforgeeks.org/introduction-to-programming-languages/ GeeksforGeeks. Software Concepts https://www.geeksforgeeks.org/software-concepts/ Malik, D. (2011). C++ Programming (5th ed., pp. 6-9). Boston, MA: Course Technology. Deitel, H., & Deitel, P. (2005). C++ how to program. Upper Saddle River, N.J.: Pearson Education. Business Dictionary. Computer Programming Retrieved from http://www.businessdictionary.com/definition/computer-programming.html Prepared by: Reviewed by: John Rainer M. Joaquin Trextan Thaddeus Sanchez SST III SSTIII PSHS-BRC PSHS-SMC CS2 | Page 5 of 5

Use Quizgecko on...
Browser
Browser