Notes

10th Computer Notes Chapter 1

10th Computer Notes Chapter 1

Chapter 1: Programming Techniques

Flowchart to find acceleration

Write short answers to the following questions.

i. Define Computer.

Ans. Computer

A Computer is a general-purpose electronic machine invented to help people solve various problems. The computer must be programmed by human beings to perform various tasks.

ii. What is an algorithm and what is the role of the algorithm in problem-solving?

Ans. Algorithm

An algorithm is a step-by-step problem-solving method that is easy to understand and follow. It is a set of steps that clearly defines a sequence of operations to solve a problem.

Role of the algorithm in problem-solving

The algorithm plays an important role in computer programming. Computer programming is the process of taking an algorithm and coding it in a programming language. Formulating an algorithm is the first step for developing a computer program.

iii. What is a flowchart?

Ans. A flowchart is a diagrammatic representation of an algorithm. It describes what operations are required to solve a given problem.

iv. What are the advantages of using flowcharts?

Ans. Following are the advantages of using flowcharts

  • It provides an easy way to analyze and find solutions to problems.
  • Once, the flowchart is drawn, it becomes very easy to write the program in any high-level language.
  • It is very helpful in communicating the problem-solving method to other people.
  • It also helps in finding and removing errors in computer programs.

v. Draw any four graphical symbols used in the flowchart and explain them.

Ans      There are mainly six basic symbols that are used in drawing the flowchart of a program. These symbols are given below

i)Flow Line

A line with an arrowhead represents the flow of control between various symbols in a flowchart

 

ii)Start/Stop Symbol

It is a rounded rectangular-shaped symbol. It is used to represent the starting and the stopping points of a flow chart.

iii) Input / Output Symbol

A parallelogram represents either input or output operations in a flowchart.

iv) Process Symbol

A rectangular block is used to represent processing symbols. It shows all the calculations.

v) Decision Symbol

A diamond represents a decision symbol used for comparison or a decision. It changes the flow of control and the computer decides a particular path to be followed.

vi) Connector Symbol

A small circle represents a connector symbol and is used to join various parts of a flow chart.

Write long answers to the following questions.

Q.1. Describe the steps involved in problem-solving.

Ans. The following five steps are involved in problem-solving on the computer.

i. Defining the problem

Defining the problem is the initial stage of problem-solving. It is very important to understand the problem before the programmer starts working on its solution.

The following are the steps to properly define and understand the problem.

  • Carefully read the problem to understand what it tells.
  • Find out what the problem asks you to do. Etc.

ii. Analyzing the problem

At this stage of problem-solving, the programmer investigates the problem and gathers as much information as possible to find a solution.

The following questions are to be asked to analyze the problem.

  • Is it possible to solve the problem on a computer?
  • What is to be done to find the solution to the problem?
  • How many solutions are possible? Etc.

iii. Planning the solution to the problem

Planning the solution to the problem is a creative stage of problem-solving. It refers to dividing the solution into steps and arranging them into the proper order that will solve the problem.

iv. Candid solution to a problem

All the possible solutions to a problem that produce correct results are known as candid solutions. To find candid solutions to a problem, the programmer has to look for different methods to solve the problem and come up with several solutions.

v. Select the best solution

After finding the candid solutions, only one solution can be selected. The selection of the final solution of a problem should be based on the following criteria.

  • Speed: The selected solution to the problem should be efficient.
  • Cost: The selected solution to the problem should provide a cost-effective way of implementation.
  • Complexity: The selected solution to the problem should not be complicated.

Q.2.  Write an algorithm to calculate the area of a rectangle forgiven breadth and length.

Ans. Algorithm:

Step 1: Start

                        Let the breadth, B be 10 and the length, L be 15

            Step 2: Calculate the area, A

                        A = B * L

            Step 3: Output A

            Step 4: Stop

Q.3. Write an algorithm that inputs length in inches and calculates and prints it in centimetres.

Ans. Algorithm:

Step 1: Start

                        Let the length in Inches be 10

            Step 2: Calculate the length in Centimeters (C)

                        C = I * 2.54

            Step 3: Output C

            Step 4: Stop

Q.4 Write an algorithm that inputs marks and prints the message “PASS” or “FAIL”. Passing marks are 33.

Ans. Algorithm:

Step 1: Start

                        Let the marks, be M

            Step 2: Compare the marks

                        IF M ≥ 33 THEN print “PASS” otherwise print “FAIL”

            Step 3: Stop

Q.5 Write an algorithm to find the sum of a given sequence. SUM = 20 + 25 + 30 + 35 + 40 + 45 + 50 + 55 + 60

Ans. Algorithm:

Step 1: Start

                        Initialize SUM to 0 and K to 5

                                    SUM=0, K=5

            Step 2: ADD K to SUM

                        SUM=SUM+K

            Step 3:  Increment K by 5

                        K=K+5

            Step 4: Check if the value of K is between 20 and 60

                        IF 20 ≤ K ≤ 60 THEN GOTO Step 2 otherwise GOTO Step 5

            Step 5: Output SUM

            Step 6: Stop

Q.6 Write an algorithm to find the product of given numbers. PRODUCT = 1x3x5x7x9x11x13x15

Ans. Algorithm:

Step 1: Start

                        Let the number, N be 1

            Step 2: Initialize loop variable K and product to 1

                        K =1 and P = 1

            Step 3:  Calculate the product

                        P = P*K

            Step 4: Increment K by 2

                        K=K+2

            Step 5: Check the value of K

                        IF 1 ≤ K ≤ 15 THEN GOTO Step 3 otherwise GOTO Step 6

            Step 6: Output P

            Step 7: Stop

Q. 7 Write an algorithm to print the multiplication table of a number in reverse order.

Ans. Algorithm:

Step 1: Start

                        Let the number, N be 7

            Step 2: Initialize K to 10

                        K =10

            Step 3:  Calculate the product

                        P = N*K

            Step 4: Output N, K, P

            Step 5: Decrease K by 1

                        K=K-1

            Step 6: Check the value of K

                        IF 1 ≤ K ≤ 10 THEN GOTO Step 3 otherwise GOTO step 7

            Step 7: Stop

Convert the algorithms of questions Q2 to Q7 to flowcharts.

Q. 2 (b) Flowchart to calculate the area of a rectangle for a given breadth and length.

Q. 3 (b) A flowchart that inputs length in inches and calculates and prints it in centimetres.

Q.4 (b) Flowchart that inputs marks and prints the message “PASS” or “FAIL”. Passing marks are 33

Q.5 (b) Flowchart to find the sum of a given sequence. SUM = 20 + 25 + 30 + 35 + 40 + 45 + 50 + 55 + 60

Q.6 (b) Flowchart to find the product of given numbers. PRODUCT = 1x3x5x7x9x11x13x15

Ans.

7 (b) Flowchart to print multiplication table of a number in reverse order.

Select the best answer for the following MCQs.

i. Which of the following structures repeats one or more operations?

A. Sequence

B. Selection

C. Loop 

D. Decision

ii. Which of the following structures allows a choice among various options?

A. Sequence 

B. Selection

C. Loop 

D. Decision

iii. Which of the following is a sequence of instructions written in a computer language to solve a problem?

A. Algorithm                                    

B. Flowchart

C. Program                                       

D. Problem Analysis

iv. What illustrates a sequence of operations to be performed to solve a problem in the form of a diagram?

A. Algorithm 

B. Flowchart

C. Program 

D. Problem Analysis

v. What is represented by a parallelogram in a flowchart?

A. Input / Output 

B. Processing

C. Start/Stop.                                  

D. Decision

vi. What is represented by a small circle in a flowchart?

A. Start/Stop                                     

B. Decision

C. Processing

D. Connector

vii. Which symbol is used for decision in a flowchart?

A. Rectangle 

B. Parallelogram

C. Diamond 

D. Oval

viii. Which symbol is used for processing in a flowchart?

A. Rectangle 

B. Parallelogram

C. Diamond 

D. Oval

Download 10th Computer Chapter 1 Notes in pdf.

Next: Chapter 2: Programming in C

Muhammad Hussain

Recent Posts

Unit 8: Entrepreneurship in Digital Age

Unit 8: Entrepreneurship in Digital Age Write answers of the following short response questions. Q.1.…

1 month ago

Unit 7: Digital Literacy

Unit 7: Digital Literacy Write answers of the following short response questions. Q.1. Differentiate between…

1 month ago

Unit 6: Impacts of Computing

Unit 6: Impacts of Computing Write answers to the following short response questions. Q1. List…

1 month ago

Unit 5: Applications of Computer Science

Unit 5: Applications of Computer Science Write answers of the following short response questions. Q1.…

2 months ago

Unit 4: Data and Analysis

10th Computer Science Unit 4 Data and Analysis Write answers of the following short response…

3 months ago

Unit 3: Programming Fundamentals

10th Computer Unit 3: Programming Fundamentals Unit 3: Programming Fundamentals Write answers of the following…

3 months ago