0% found this document useful (0 votes)
10 views10 pages

CH 1 Programming technique

The document provides an overview of programming techniques for Grade 10 Computer Science, focusing on concepts such as algorithms, flowcharts, and problem-solving steps. It includes definitions, graphical symbols used in flowcharts, and the advantages of using flowcharts in programming. Additionally, it outlines various algorithms and their applications in solving mathematical problems.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views10 pages

CH 1 Programming technique

The document provides an overview of programming techniques for Grade 10 Computer Science, focusing on concepts such as algorithms, flowcharts, and problem-solving steps. It includes definitions, graphical symbols used in flowcharts, and the advantages of using flowcharts in programming. Additionally, it outlines various algorithms and their applications in solving mathematical problems.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

PISK COMPUTER SCIENCE GRADE10 1

symbols. It indicates the flow of control.


UNIT 1 (PROGRAMMING TECHNIQUES) Start/Stop Symbol: It is a rounded rectangular shaped. It is used to
indicate the start or end of a
SHORT QUESTIONS flowchart. We can only
QI. Define Computer. write the words START or
A computer is an electronic data processing device. It reads data STOP inside this symbol. A
processing and produces results accurately at a very high speed. flowchart can only have
Q2. What is algorithm and what is the role of algorithm in problem one start but it may have
solving? many ends.
Algorithm: Input/Output Symbol
Algorithm means method, procedure, technique or plan. It is a step-by- It contains the word READ
step problem solving method. It is easy to understand and follow. It is a or INPUT along with the
set of steps that clearly defines a sequence of operations to solve a variables for input operation
problem. or PRINT for OUTPUT
Role of Algorithm in Problem Solving: along with the output data
Algorithm plays an important role in computer programming. for output operation.
Computer programming is the process of taking an algorithm and coding Processing Symbol:
it in a programming language. Formulating an algorithm is the first step It is represented by a rectangular block. It is used for data processing
for developing a computer program. operation. All the calculations appear inside the processing symbol, such
QIV .Draw any four graphical symbols used in flowchart and explain as “SUM=A+B”. Variables are also initialized inside the process symbol
them. such as “K=1”.
Flowchart symbols have specific meaning and are connected by arrows
indicating the flow from one step to another. Decision Symbol:
Flow line: A decision or branching point. Lines representing different decisions
It is a line with arrow head. It is used to connect various flowchart emerge from different points of the diamond.
PISK COMPUTER SCIENCE GRADE10 2

QIII. What is a flowchart?  Find out what the problem asks to do.
Flowchart is a diagrammatic representation of algorithm. It describes  What information can be obtained from the problem?
what operations are required to solve a given problem.
 What is required to be calculated as the solution of the problem?
QIV. What are the advantages of using flowcharts?
 Flowchart illustrates the sequence of operations to be performed 2) Analyzing the Problem:
to solve a problem. The programmer investigates the problem and gathers as much
 Programmers draw flowcharts before writing computer programs. information as possible to find a solution. The following questions
 Flowchart provides an easy way to analyze and find solutions of can be asked to analyze the problem.
problems.  Is it possible to solve the problem on a computer?

 Once, the flowchart is drawn, it becomes very easy to write the  What is to be done to find the solution of the problem?
program in any high level language.  What is the proper and what output is required?
 Flowchart is very helpful in communicating the problem solving  How many solutions are possible?
method to other people.  Which solution is the best and why?
 It also helps in finding and removing errors in computer programs.  How solution will be implemented?
LONG QUESTIONS
3) Planning The Solution Of The Problem:
Q3.Describe the steps involved in problem solving?
It refers to dividing the solution of any problem into steps and
The following five steps are involved in problem solving on computer.
arranging them into proper order.
How to Discuss a Problem:
1) Defining the Problem:
 Talk to the right person.
Defining the problem is first stage of problem solving. It’s very
 Focus on talking about the problem only.
important to understand the problem before the programmer starts
working on its solution. The following are the steps to properly  Stay calm and reasonable.

define and understand the problem.  Explain the problem in detail and provide any evidence you may
 Carefully read the problem to understand what it tells. have.
PISK COMPUTER SCIENCE GRADE10 3

 Tell them what outcome you want. Q5.Write an algorithm that inputs length in inches and calculate

 Listen to their response. and prints it in centimeters.


Step 1 Input the length in inches (LI)
 Does his/her response resolve your issue?
Step 2 Calculate the length in cm (LCM) by multiplying LI
4) Candid Solutions of a Problem: with 2.54
All the possible solutions of a problem that produce correct result are Step 3 Print LCM
known as candid solutions. To find candid solutions of a problem,
programmer has to look for different methods to solve the problem and Q6.Write an algorithm that inputs marks and prints the
come up with several solutions. message “PASS” or “FAIL”. Passing marks are 33.
5) Select The Best Solution: Step 1 Input Marks (M)
After finding the candid solutions, only one solution can be Step 2 Check if (M<33) then Print “FAIL” GOTO Step 4
selected. The selection of final solution of a problem should be Step 3 ELSE Print “PASS”
based on the followings: Step 4 Stop
 Speed: It means when the solution is implemented in a
programming language, the program should run fast.
Q7.Write an algorithm to find the sum of given sequence.
 Cost: The selected solution should be cost-effective.
Step 1 Start
 Complexity: The selected solution of the problem should not be
Initialize Sum to 0 and K=5
complicated.
Step 2 Add K to SUM SUM=SUM+K
Q4.Write an algorithm to calculate the area of a rectangle for Step 3 Increments K by 5
given breath and length? K=K+5
Step 1 Input the width W) and Length (L) of a rectangle Step 4 Check if the value of K is less than or equal to 60
Step 2 Calculate the area (A) by multiplying L with W IF K≤100 THEN GOTO Step 2 otherwise GOTO Step 5

Step 3 Print A Step 5 Print SUM


Step 6 Stop
PISK COMPUTER SCIENCE GRADE10 4

Q8.Write an algorithm to find the product of given numbers. Step 3 Otherwise GOTO Step 6
PRODUCT = 1×3×5×7×9×11×13×15 Step 6 Stop
Step 1 Start
Initialize variable K to 1 and prod = 1 K=1 Prod= 1 Q10. Write an algorithm and draw flow chart to calculate the area
Step 2 Increment K by 2 of a rectangle for given breadth and length.
K=K+2 1. Start
Step 3 Find the Product 2. input l, b for rectangle.
Prod=Prod × K 3. Calculate Area=l*b.
Step 4 Check if the value of K is less than 16 4. Output area.
IF K<16 THEN GOTO Step 2 otherwise GOTO Step 5 5. End
Step 5 Print product
Print Prod
Step 6 Stop

Q10. Draw a flow chart that inputs length in inches and


Q9.Write an algorithm to print multiplication table of a number in calculates and prints it in centimeters.
reverse order.
Step 1 Enter the number N whose table is to be generated
Step 2 Initialize the valve of 1 with 10
I=10
Step 3 Find the product of N and I
Prod= N × I
Step 4 Print N, I and Prod
Print N I and Prod
Step 5 Decrease the value of I by 1 I=I – 1
Step 5 IF the value of I is > 0 THEN GOTO
PISK COMPUTER SCIENCE GRADE10 5

Q10. Draw a flowchart to find the product of given numbers.


Q10. Draw a flowchart that inputs marks and prints the message PRODUCT = 1x3x5x7x9x11x13x15-------59
“pass” or “fail”. Passing marks are 50.

P=1,k=1

P=p*k1,k=k+2

PRINT P

Q10. Write a Flowchart to print multiplication table


of a number in order and reverse order.
Q10. Write a Flowchart to find the sum of given sequence.
SUM = 20+25+30+40+45+50+55+60

I=10

I=I-1
PISK COMPUTER SCIENCE GRADE10 6

Area of Rhombus
1. Start
2. input diagonals d1, d2 for Rhombus.
3. Calculate R.Area=1/2(d1xd2)
4. Output R.area.
5. End

Area of Trapezium
1. Start
2. input enter length of two
parallel sides A,B.
3. Calculate T. Area=(A*B)*H/2
TO FIND INTEREST
4. Output T.area.

5. End

1. Start
VOLUME OF CYLINDER 2. Input Amount, years and
1. Start
rate
2. Input h and r for cylinder.
3. Calculate
3. Calculate Volume= H*3.14*R2.
interest=amount*year*rate/100
4. Output Volume. 4. Output interst.
5. End
5. End
PISK COMPUTER SCIENCE GRADE10 7

FOR ODD NUNBER LIST


VOLUME OF SPHERE Step 1 Start
1. Start Step 2 Initialize I=1
2. Input h and r for sphere. Step 3 IF I>100 THEN GOTO Step 6
3
3. Calculate S. Volume= 4/3*3.14*R . Step4 ELSE PRINT I
4. Output S. Volume. Step 5 I=I+2 GOTO STEP 3
Step 6 Stop
FOR EVEN NUNBER LIST
Step 1 Start
Step 2 Initialize I=2
Step 3 IF I>100 THEN GOTO Step 6
Step4 ELSE PRINT I
Step 5 I=I+2 GOTO STEP 3
Step 6 Stop

FLOW CHART GIVEN ABOVE JUST CHANGE I=2


PISK COMPUTER SCIENCE GRADE10 8

TELL THE NUMBER IS EVEN Q. What is defining in finding average marks of a student?
OR ODD It is clear from the problem statement that average marks of a student
Step 1 Start have to be found. This is numeric problem.
Step 2 Input number Q. What information is required Finding average marks of a student.
Step 3 IF number%2 ==0 To analyze Problem the following information is required.
THEN PRINT What are the subject marks of the student in each subject?
EVEN number How many subjects are there?
Otherwise PRINT ODD Number What is the formula to find the average marks?
Step 5 Stop
Q. What is planning to find average marks of a student?

To plan the solution of the Problem after analyzing the


SUM OF SERIES FROM 1 TO 100 problem, the following planning is required:

All subject marks are to be added together to find the sum


of all the marks.

The sum is to be divided by the total number of subjects to


find the average marks.

Q. What is candid solution to launch complaint?


Many solutions can be considered to resolve the Problem.
Solution 1: The customer can lodge the complaint personally visiting the
company.
Solution 2: The customer can also use the courier services to send the
ALGORITHM TO FIND GCD INCLUDED IN UNIT4
product back.
ALGORITHM TO FIND LCM INCLUDED IN UNIT4
Solution 3: The customer can use company’s website to file the
ALGORITHM TO FIND PRIME NUMBER INCLUDED IN UNIT4
complaint.
Some more Unseen questions
PISK COMPUTER SCIENCE GRADE10 9

Q. What are steps for drawing flowchart? Q. What are steps/ criteria to check efficiency of algorithm?

The flowchart developer must determine the following An algorithm must be analyzed very carefully. For maximum
requirements for the given problem or algorithm before efficiency of algorithm we must minimize resource usage. For this the
drawing a flowchart. algorithm developer must determine the following requirements for the
 Input to the flowchart given problem.
Input: The algorithm developer must know what exactly the input. The
 Type of processing required
input is determined from the problem statement. Input the correct data
 Decisions to be taken
for algorithm.
 The output to be produced after processing Processing: The algorithm developer must decide what type of calculation
Input: The flowchart developer must know what exactly the is to be performed or which formula is to be applied to obtain the
input to the flowchart is. The input is determined from the required result
problem statement. Decision: the developer must decide which control structure sequence,
Processing: The flowchart developer must decide what type of selection and repetition) are to be applied for the solution of the problem.
calculation is to be performed or which formula is to be applied to Decisions to be taken should be accurate.
obtain the required result
Output: The algorithm must provide the required output. The output to be
Decision: the developer must decide which control structure sequence,
produced after processing.
selection and repetition) are to be applied for the solution of the
Q. Define system and its components.
problem.
Output: The flowchart must provide the required output. A system is combinations of different components that work

Q. What is measuring efficiency of an algorithm? with each other perform specific tasks. Different procedures are

The efficiency of an algorithm is the property which relate the algorithm used to perform different tasks in the system.

to the amount of computational resources used in it. An algorithm must Q. Write planning to find the product of given numbers.
be analyzed to determine its resource usage (e.g. time, memory and PRODUCT = 1x3x5x7x9x11x13x15
storage space). For maximum efficiency we wish to minimize resource Planning the Solution:
usage.
Input: This problem has no input
PISK COMPUTER SCIENCE GRADE10 10

Required Output: product of odd numbers 1 to 15 V. Important Note


Processing: product of all the odd numbers from 1 to 15
Note: prepare all algorithm and flowchart given in
Q. What is SDLC? Discuss its different phases.
book form Unit1 and also convert them into
SDLC stands for system development life cycle. It is a set of
different steps that performed to develop a system. It is an program.
organized way of developing successful system consists of
different phases. These phases are as follows:

1. System define 2. System Analysis


3. System Design 4. System Coding
5. System Testing 6. System Implementation

7. System Maintenance

You might also like