CBSE Class 6  >  Class 6 Notes  >  Computer Science  >  Chapter Notes: Intro to Computer Programming

Intro to Computer Programming Chapter Notes | Computer Science for Class 6 PDF Download

Introducing Computer Programming

A computer program is a set of clear and ordered instructions that tell a computer how to perform a task. These instructions enable the computer to interact with the user, other devices (peripherals) and information stored in the computer.

The language used to write these instructions is called a programming language. Examples of programming languages include C, Python and Java. The activity of writing instructions in a programming language is called computer programming or simply programming.

When you write a program you must follow the rules of that language. These rules are called the syntax of the language. A programming language also gives you operators and constructs to:

  • perform calculations and manipulate values of variables;
  • compare values using relational operators (for example, =, <, >);
  • make choices and test conditions using decisions (for example, if-then) so the program can follow different paths;
  • repeat tasks using loops or repetition constructs.

Programming is a way of solving problems step by step. Before writing actual code, programmers often plan the solution using simple language (called pseudocode) or by drawing diagrams called flowcharts. Planning helps to check the logic and to communicate the idea clearly to others.

Developing Flowchart

A flowchart is a diagrammatic way to represent the logic and steps of a program. It shows how input is transformed into output by a sequence of operations and decisions. Flowcharts are useful for understanding, discussing and testing the logic of a program before actual programming begins.

Flowcharts serve as a common language between people who analyse a problem and those who write the program. They help find errors in logic and make it easier to explain the procedure to others.

Flowchart Symbols

  • Start / Stop (Terminator) - indicates the beginning or end of the flowchart. It is usually drawn as an oval or rounded rectangle.
  • Processing (Action) - a rectangle that shows an operation such as calculation, assignment, or changing a variable.
  • Flow Line - arrows that show the direction of flow from one step to the next.
  • Input / Output - a parallelogram used for reading data (input) or displaying results (output).
  • Decision - a diamond shape used to test a condition and branch the flow depending on the answer (for example, yes/no or true/false).
Flowchart Symbols

Rules for Drawing Flowcharts

  • Only one flow line should come out from a process symbol.
  • The general direction of flow is from top to bottom or from left to right. Use arrows to show direction clearly.
  • In a decision box one flow line enters and two or more flow lines can come out to show different outcomes.
  • Only a single flow line should come out from the Start symbol and a single flow line should enter the Stop symbol.
  • Every flowchart must have a clear logical start and a clear logical end.

Illustrative Example

The following flowchart shows a program that decides and prints the grade of an employee according to his or her salary. The figure illustrates how input, decisions and output are arranged to reach the final result.

Illustrative Example

Explanation of the flowchart logic:

  • Begin at the Start symbol.
  • Read the salary of the employee using an input symbol.
  • Use one or more decision boxes to compare the salary against required thresholds; each decision leads to a different branch for the next step.
  • In each branch, use a process symbol to assign the corresponding grade based on the condition that is true for that branch.
  • Use an output symbol to display or print the employee's grade.
  • End at the Stop symbol once the grade is produced.

Flowcharts make it easier for beginners to follow the flow of a program and to translate the steps into real code later. When creating a flowchart, keep symbols clear, label decision outcomes (for example, Yes / No), and ensure that every possible path eventually reaches the Stop symbol.

Summary: A computer program is a set of instructions written in a programming language following its syntax. Before writing code, plan the steps using algorithms or flowcharts. Flowcharts use standard symbols such as Start/Stop, Processing, Input/Output, Decision and Flow Lines to represent the sequence and decisions of the program in a clear visual form.

The document Intro to Computer Programming Chapter Notes | Computer Science for Class 6 is a part of the Class 6 Course Computer Science for Class 6.
All you need of Class 6 at this link: Class 6
39 videos|28 docs|6 tests

FAQs on Intro to Computer Programming Chapter Notes - Computer Science for Class 6

1. What are the basic symbols used in creating a flowchart?
Ans. The basic symbols used in creating a flowchart include start/end, process, decision, input/output, and connector symbols.
2. What is the importance of flowchart symbols in creating a flowchart?
Ans. Flowchart symbols help to visualize the steps of a process, making it easier to understand and analyze complex processes or algorithms.
3. How can flowcharts be helpful in computer programming?
Ans. Flowcharts can be helpful in computer programming as they provide a visual representation of the logic and flow of a program, making it easier for programmers to understand and debug their code.
4. What are some common input and output devices used in computers?
Ans. Common input devices include keyboards, mice, and scanners, while common output devices include monitors, printers, and speakers.
5. Can you explain the history of computers briefly?
Ans. The history of computers dates back to the 1940s when the first electronic computers were developed. Over the years, computers have evolved from large, room-sized machines to the compact devices we use today.
Related Searches
Sample Paper, Free, Intro to Computer Programming Chapter Notes | Computer Science for Class 6, Summary, Intro to Computer Programming Chapter Notes | Computer Science for Class 6, Exam, Extra Questions, Intro to Computer Programming Chapter Notes | Computer Science for Class 6, Important questions, video lectures, Previous Year Questions with Solutions, ppt, Objective type Questions, Viva Questions, MCQs, practice quizzes, mock tests for examination, Semester Notes, past year papers, shortcuts and tricks, pdf , study material;