418036Introduction to ProgrammingIntroduction to Programming :Introduction to ProgrammingLesson 1 OverviewIn Lesson 1, you’ll read anintroduction to computersand programming...

1 answer below »
Please highlighted area for assignment instructions


418036 Introduction to Programming Introduction to Programming : Introduction to Programming Lesson 1 Overview In Lesson 1, you’ll read an introduction to computers and programming before learning how to create a program. Then, you’ll learn about modules and programming best practices. 1.1 Describe the basic concept of programming Introduction to Computers and Programming READING ASSIGNMENT Read this assignment. Then, read Chapter 1 of your textbook. Computers are programmed to perform powerful tasks, or what a user tells them to do. A program is a set of instructions for the computer to follow. Programs are often referred to as software. Someone who creates programs or software is known as a programmer or software Page 1Copyright Penn Foster, Inc. 2019 Course Version: 1 developer. Hardware refers to the physical parts of a computer. You’ll review examples of different types of hardware, such as the following: The central processing unit (CPU) is the part of the computer that runs, or executes, programs. Main memory is where the computer stores a program and its data while the program is running. Secondary storage is a type of memory that can hold data for long periods of time and exists on internal and external disk drives. Input devices are components, such as scanners, microphones, and the keyboard, that collect data and send it to the computer. Output devices format and present data the computer produces, such as a report or graphic image. Computers store data in bytes, which are tiny storage locations. Each byte is divided into eight smaller units called bits. These bits act like switches because they’re either “on” or “off.” When bits represent numbers, or binary numbers, they’re assigned the number 0 when off and 1 when on. You’ll read more about how numbers and characters are stored in this chapter. Machines understand machine language, which is instructions written in binary. It’s impractical for people to write in machine language, so assembly language was created. Assembly language uses short words known as mnemonics. A special program called an assembler Page 2Copyright Penn Foster, Inc. 2019 Course Version: 1 translates assembly language to a machine language. Assembly language is similar to machine language, so it’s considered a low-level language. High-level languages allow programmers to write complex programs without knowing how the CPU works and without writing a large number of low-level instructions. A collection of high-level programming languages is listed in Table 1-1 of your textbook. For each programming language, programmers write statements known as source code. The source code must follow certain rules, called syntax, for it to be understood. The commands that tell the computer what to do must also follow a certain sequence, or logic, so the computer can process the request. A compiler is a program that translates the high-level programming language into a separate machine language program. System software manages computer operations and includes operating systems, utility programs, and software development tools. Application software is used for tasks, which include word processing, email, and spreadsheets. Make sure to answer the checkpoints in the textbook as you read the chapter. Check your answers in Appendix E at the back of your textbook. Key Points and Links READING ASSIGNMENT Page 3Copyright Penn Foster, Inc. 2019 Course Version: 1 Key Points A program or piece of software is a set of instructions for the computer to follow. Hardware refers to the physical parts of a computer, such as the central processing unit (CPU), main memory, secondary storage, input devices, and output devices. Computers store data in bytes, which are tiny storage locations each divided into eight smaller units called bits. Machines understand machine language, which are instructions first written in a low-level assembly language and then translated into binary by an assembler. High-level languages allow programmers to write complex programs without knowing how the CPU works and without writing a large number of low-level instructions. For each programming language, programmers write statements (source code) that must follow certain rules (syntax) and certain sequences (logic) for it to be understood. A compiler is a program that translates the high-level programming language into a separate, machine-language program. System software manages computer operations and includes operating systems, utility programs, and software development tools, while application software is used for tasks, which include word processing, email, and spreadsheets. Page 4Copyright Penn Foster, Inc. 2019 Course Version: 1 3. The ASCII codes for the name Marty are M = 77, a = 97, r = 114, t = 226, and y = 121. 4. The BASIC programming language was created in 1964 by John George Kemeny and Thomas Eugene Kurtz to provide computer access to nonscience students. The C++ programming language was created by Bjarn Stroustrup in 1979 as an enhancement to the C programming language. The Java programming language was created by James Gosling in 1995 as a platform- independent programming language. Python was created by Van Rossum in 1989 as a successor to the ABC programming language. 1.2 List the steps of program creation Input, Processing, and Output READING ASSIGNMENT Read this assignment. Then, read Chapter 2 and Appendices B and C of your textbook. Programmers perform five steps when creating a program: 1. Design the program. 2. Write the code. 3. Correct errors regarding the syntax, or the programming Page 8Copyright Penn Foster, Inc. 2019 Course Version: 1 language’s rules. 4. Test the executable code. 5. Debug the code, or fix any errors in the code so the program will work correctly. When planning the logic of a program, programmers often use flowcharts or pseudocode. A flowchart is a pictorial representation of the steps in a program. Pseudocode is an English-like representation of the steps. See Appendix B and Appendix C in your textbook for more information on flowcharts and pseudocode. Computer programs work by following these three steps: 1. Receive input (data). 2. Perform a process. 3. Produce output (the results of the process, such as displaying information or performing a task). IPO stands for input, processing, and output. An IPO chart describes the IPO of a program using columns. An example is shown in Figure 2-6 of your textbook. Program code can become quite complicated, so keep your code as simple as possible by using structures or control structures. These are logical designs that control the order in which a set of statements executes. Figure 2-9 of your textbook shows a flowchart of statements executing in order. Page 9Copyright Penn Foster, Inc. 2019 Course Version: 1 Programmers use strings and variables when creating programs. A string is a sequence of characters that’s used as data. A variable is a storage location in memory used to store data. The name of a variable should be no more than one word. When assigning values to variables, programmers often use the equals sign (=). Many programs require some sort of calculation to be performed, such as addition or multiplication. In this chapter, you’ll read about these and other common math operations. You’ll also learn about the order of operations, which dictates that the division operator works before the addition operator, for example. In most programs, variables must be declared before they can be used. This means that you must name the memory location and specify the type of data. Variable names are usually nouns, such as payRate, and types are the type of data the variable will hold (numbers or letters, for example). Named constants are like variables, but they represent values that can’t be changed during the program’s execution. When you’re done working on a program, you should check it for errors. Hand tracing is a debugging process where you pretend to be the computer executing the program and go through each statement one by one. Two types of documentation are generated during the programming process. External documentation is for the people who use your Page 10Copyright Penn Foster, Inc. 2019 Course Version: 1 programs—the end users—who will need documentation to know how to use your program. This type of documentation is also called user documentation. Internal documentation is for the programmer and includes program comments that identify the logic of the program. Make sure to answer the checkpoints in the textbook as you read the chapter. Check your answers in Appendix E at the back of your textbook. Key Points and Links READING ASSIGNMENT Key Points Programmers perform five steps when creating a program: Design the program, write the code, correct errors regarding the syntax, test the executable code, and debug the code. When planning the logic of a program, programmers often use flowcharts or pseudocode. Computer programs work by following these three steps: Receive input, perform a process, and produce output. Keep your code as simple as possible by using structures or control structures (logical designs that control the order in which a set of statements executes). Programmers use strings (sequences of characters that are used as data) and variables (storage locations for data) when creating programs. Page 11Copyright Penn Foster, Inc. 2019 Course Version: 1 Many programs require some sort of calculation to be performed, and the order of operations dictates how they're performed. In most programs, variables must be declared before they can be used. Hand tracing is a debugging process where you pretend to be the computer executing the program and go through each statement one by one. Two types of documentation are generated during the programming process: external documentation for end users and internal documentation for programmer(s). Page 12Copyright Penn Foster, Inc. 2019 Course Version: 1 Answers for the Algorithm Workbenches, Debugging Exercises, and Programming Exercises are in the CSC105 Lesson 1 Additional Exercise Answers supplement. 1.3 Explain the steps for creating modules Modules READING ASSIGNMENT Read this assignment. Then, read Chapter 3 of your textbook. Programmers usually break down a program into separate units called modules. Modularization, or breaking programs into modules, is beneficial because it does the following: Uses simpler code Promotes code reuse Enables better testing Makes the program easier to maintain Allows for faster development Makes it easier for programmers to work in a team Watch Systems Academy’s video "Modular Design" (www.youtube.co m/embed/DuK4dKH0zOA) for more information about this topic. When naming a module, be sure to give it a one-word name that Page 15Copyright Penn Foster, Inc. 2019 Course Version: 1 https://www.youtube.com/embed/DuK4dKH0zOA identifies it. Module names are often verbs, such as calculatePayment. To create a module, you write its definition, which consists of a header (starting point) and a body (list of statements that belong to the module). To execute the module, you must call it. Note that modules can also call other modules. Flowcharts can depict a module’s flow of logic graphically. However, a hierarchy chart or structure chart shows the relationships among modules. It also shows which modules call which other modules. An example is shown in Figure 3-7 of your textbook. Local variables are variables declared inside modules. The scope describes the part of a program in which the local variable may be accessed. You can’t have two variables with the same name within the same scope. Global variables are variables that can be accessed by all modules in a program; they’re declared outside modules. Global constants are named constants that are available to every module in the program. Arguments are pieces of data sent into modules. Parameters are variables that receive arguments passed into modules. You’ll read about various ways to pass arguments into modules, such as passing arguments by value and by reference. Make sure to answer the checkpoints in the textbook as you read the chapter. Check your answers in Appendix E at the back of your textbook. Page 16Copyright Penn Foster, Inc. 2019 Course Version: 1 Key Points and Links READING ASSIGNMENT Key Points Programmers usually break down a program into separate units called modules. To create a module, you write its definition; to execute the module, you must call it. A hierarchy chart shows the relationships among modules and which modules call which other modules. Local variables are variables declared inside modules, while global variables are variables that can be accessed by all modules in a program; they’re declared outside modules. Arguments are pieces of data sent into modules. Parameters are variables that receive arguments passed into modules. Links Systems Academy "Modular Design" (www.youtube.com/embed/ DuK4dKH0zOA) Exercise: Modules Answer the Review Questions and the following exercises at the end of Chapter 3 in your textbook: Page 17Copyright Penn Foster, Inc. 2019 Course Version: 1 https://www.youtube.com/embed/DuK4dKH0zOA 1.4 Create pseudocode and a flowchart for a modular program CSC105 Graded Project 1 READING ASSIGNMENT Your project must be submitted as a zipped/compressed (*.zip) file that includes the following files: Text file (*.txt) of your pseudocode Screenshot(s) in JPEG format (*.jpg) of your flowchart A Rich Text Format (*.rtf) or Microsoft Word (*.doc) file that lists the following information: Your name Your student ID number The exam number Your email address For information on how to take and save a screenshot on your computer, visit the link that's most applicable to you: Digital Trends "How to Take a Screenshot on a PC" (www.digitaltrends.com/computing/how-to-take-a-screenshot-on-pc/) Digital Trends "How to Take a Screenshot on a Mac" (www.digitaltrends.com/computing/how-to-take-a-screenshot-on-a-mac/) For information on how to compress a file, visit the link that's most applicable to
Answered 2 days AfterDec 19, 2022

Answer To: 418036Introduction to ProgrammingIntroduction to Programming :Introduction to...

Pratyush answered on Dec 21 2022
28 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here