The document provides examples and explanations of key concepts in problem solving and algorithms:
1) It defines problem analysis as understanding the problem by identifying the 5 Ws (what, who, when, where, why), and provides two examples of problem analysis.
2) It defines an algorithm as a set of steps to accomplish a task, and explains their role and importance in problem solving through examples.
3) It discusses how to choose the most efficient algorithm when multiple algorithms exist to solve a problem, using examples to compare efficiency based on steps and memory usage.
A data structure is a storage that is used to store and organize data. It is a way of arranging data on a computer so that it can be accessed and updated efficiently. A data structure is not only used for organizing the data. It is also used for processing, retrieving, and storing data. That entire data can be represented using an object and can be used throughout the program.
A data structure is a storage that is used to store and organize data. It is a way of arranging data on a computer so that it can be accessed and updated efficiently. A data structure is not only used for organizing the data. It is also used for processing, retrieving, and storing data. That entire data can be represented using an object and can be used throughout the program.
Introduction
The term problem solving is used in many disciplines, sometimes with different perspectives and
often with different terminologies. The problem-solving process starts with the problem
specification and end with a correct program.
The steps to follow in the problem-solving process are:
Problem definition
Problem Analysis
Algorithm development
Coding
Testing & Debugging
Documentation & Maintenance
The stages of analysis, design, programming, implementation and maintenance form the life cycle
of the system.
Cis 1403 lab1- the process of programmingHamad Odhabi
This lab aims to develop students knowledge and skills needed to create a simple programming code. It covers the process of developing computer programs starting from a simple analysis of the problem, identifying outputs, inputs, and design process/algorithm, convert algorithm to code, testing, and documentation. The student will be introduced to the Java program structure, numerical variable and high-level introduction to data types. The lab does not go into depth explaining the data types and memory storage. These will be discussed in the upcoming labs. Also, the student will be introduced to the REPL cloud environment that will be used to create a simple application.
Case Study Analysis 2The Cholesterol.xls records cholesterol lev.docxwendolynhalbert
Case Study Analysis 2
The Cholesterol.xls records cholesterol level data for individuals. Descriptions for the data follow:
· Cholesterol: Cholesterol level (mg/dL)
· Income: annual income in $
· Age: age of individual
· Jogging: number of hours an individual spends on jogging a day
· Saturated fat: the amount of saturated fat an individual takes a day (g)
(A) Develop an estimated regression equation that can be used to predict Cholesterol level using age, jogging income, and saturated fat. Discuss your findings including interpretation of slope of each variable and significance, using at least 200 words. Use .
(B) Starting with the estimated regression equation developed in part (A), delete any independent variables that are not statistically significant and develop a new estimated regression equation that can be used to predict Cholesterol level. Use . Discuss your findings including interpretation of slope of each variable and significance, using at least 200 words. Use .
(C) Compare model (A) and (B) in terms of R^2 and which model fits the data better? Discuss this using at least 100 words
(D) In model B, what are the most important factors affecting Cholesterol level? What are the least important factors? Discuss this using at least 100 words
Assignment1DueTHURSDAY.zip
Assignment1/Assignment1-17.pdf
ICT209 Assignment 1, Murdoch University 2016
ICT209 Assignment 1, Murdoch University 2016 1
ICT209 Assignment 1 2016
Objectives:
• Demonstrate that you can do Object Oriented design
• Demonstrate that you can write Object Oriented programs using C++.
• Demonstrate that you can design and write programs using user defined data structures.
• Demonstrate that you can work with data files.
• Demonstrate that you can write test plans and show evidence of systematic testing.
• Demonstrate that you can design using UML.
You do not work in groups for this assignment, as this is an individual assignment.
Worth:
14% of the unit
Due:
Midnight (end of Session 7). This would be the 7th teaching week.
How to submit (also see unit guide - section on Assignment/Project submission/return):
Singapore or Dubai Campus:
Into the assignment submission area for the unit in LMS. Follow all directions from your lecturer.
Murdoch Campus Internal students:
Into the assignment submission area for the unit in LMS.
Externals:
Into the assignment submission area for the unit in LMS.
For submitting in LMS, zip up the entire folder. Make sure that you have included all needed files. Do not
include temporary files or files not relevant to the assignment.
Name the zip file with the unit code, Assignment number, your name, student number.
ICT209Asg1JoBlogs12345678.zip
or alternatively,
ICT209_Asg1_JoBlogs_12345678.zip
Textual submissions should be type-written. External documentation can only be in the following formats:
Text (.txt)
PDF (.pdf)
RTF (.rtf)
HTML (.html)
Image formats : PNG ...
Jagannath Institute Of Management Sciences, Vasant Kunj-II is one of the best BCA colleges in Delhi. Dr. Arpana Chaturvedi shares here the Notes of C- Algorithms. This subject is taught to semester I students of BCA
Algorithm and C code related to data structureSelf-Employed
Everything lies inside an algorithm in the world of coding and algorithm formation which is the basis of data structure and manipulation of the algorithm in computer science and information technology which is ultimately used to find a particular problems solution
Francesca Gottschalk - How can education support child empowerment.pptxEduSkills OECD
Francesca Gottschalk from the OECD’s Centre for Educational Research and Innovation presents at the Ask an Expert Webinar: How can education support child empowerment?
Introduction
The term problem solving is used in many disciplines, sometimes with different perspectives and
often with different terminologies. The problem-solving process starts with the problem
specification and end with a correct program.
The steps to follow in the problem-solving process are:
Problem definition
Problem Analysis
Algorithm development
Coding
Testing & Debugging
Documentation & Maintenance
The stages of analysis, design, programming, implementation and maintenance form the life cycle
of the system.
Cis 1403 lab1- the process of programmingHamad Odhabi
This lab aims to develop students knowledge and skills needed to create a simple programming code. It covers the process of developing computer programs starting from a simple analysis of the problem, identifying outputs, inputs, and design process/algorithm, convert algorithm to code, testing, and documentation. The student will be introduced to the Java program structure, numerical variable and high-level introduction to data types. The lab does not go into depth explaining the data types and memory storage. These will be discussed in the upcoming labs. Also, the student will be introduced to the REPL cloud environment that will be used to create a simple application.
Case Study Analysis 2The Cholesterol.xls records cholesterol lev.docxwendolynhalbert
Case Study Analysis 2
The Cholesterol.xls records cholesterol level data for individuals. Descriptions for the data follow:
· Cholesterol: Cholesterol level (mg/dL)
· Income: annual income in $
· Age: age of individual
· Jogging: number of hours an individual spends on jogging a day
· Saturated fat: the amount of saturated fat an individual takes a day (g)
(A) Develop an estimated regression equation that can be used to predict Cholesterol level using age, jogging income, and saturated fat. Discuss your findings including interpretation of slope of each variable and significance, using at least 200 words. Use .
(B) Starting with the estimated regression equation developed in part (A), delete any independent variables that are not statistically significant and develop a new estimated regression equation that can be used to predict Cholesterol level. Use . Discuss your findings including interpretation of slope of each variable and significance, using at least 200 words. Use .
(C) Compare model (A) and (B) in terms of R^2 and which model fits the data better? Discuss this using at least 100 words
(D) In model B, what are the most important factors affecting Cholesterol level? What are the least important factors? Discuss this using at least 100 words
Assignment1DueTHURSDAY.zip
Assignment1/Assignment1-17.pdf
ICT209 Assignment 1, Murdoch University 2016
ICT209 Assignment 1, Murdoch University 2016 1
ICT209 Assignment 1 2016
Objectives:
• Demonstrate that you can do Object Oriented design
• Demonstrate that you can write Object Oriented programs using C++.
• Demonstrate that you can design and write programs using user defined data structures.
• Demonstrate that you can work with data files.
• Demonstrate that you can write test plans and show evidence of systematic testing.
• Demonstrate that you can design using UML.
You do not work in groups for this assignment, as this is an individual assignment.
Worth:
14% of the unit
Due:
Midnight (end of Session 7). This would be the 7th teaching week.
How to submit (also see unit guide - section on Assignment/Project submission/return):
Singapore or Dubai Campus:
Into the assignment submission area for the unit in LMS. Follow all directions from your lecturer.
Murdoch Campus Internal students:
Into the assignment submission area for the unit in LMS.
Externals:
Into the assignment submission area for the unit in LMS.
For submitting in LMS, zip up the entire folder. Make sure that you have included all needed files. Do not
include temporary files or files not relevant to the assignment.
Name the zip file with the unit code, Assignment number, your name, student number.
ICT209Asg1JoBlogs12345678.zip
or alternatively,
ICT209_Asg1_JoBlogs_12345678.zip
Textual submissions should be type-written. External documentation can only be in the following formats:
Text (.txt)
PDF (.pdf)
RTF (.rtf)
HTML (.html)
Image formats : PNG ...
Jagannath Institute Of Management Sciences, Vasant Kunj-II is one of the best BCA colleges in Delhi. Dr. Arpana Chaturvedi shares here the Notes of C- Algorithms. This subject is taught to semester I students of BCA
Algorithm and C code related to data structureSelf-Employed
Everything lies inside an algorithm in the world of coding and algorithm formation which is the basis of data structure and manipulation of the algorithm in computer science and information technology which is ultimately used to find a particular problems solution
Francesca Gottschalk - How can education support child empowerment.pptxEduSkills OECD
Francesca Gottschalk from the OECD’s Centre for Educational Research and Innovation presents at the Ask an Expert Webinar: How can education support child empowerment?
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
Acetabularia Information For Class 9 .docxvaibhavrinwa19
Acetabularia acetabulum is a single-celled green alga that in its vegetative state is morphologically differentiated into a basal rhizoid and an axially elongated stalk, which bears whorls of branching hairs. The single diploid nucleus resides in the rhizoid.
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
Biological screening of herbal drugs: Introduction and Need for
Phyto-Pharmacological Screening, New Strategies for evaluating
Natural Products, In vitro evaluation techniques for Antioxidants, Antimicrobial and Anticancer drugs. In vivo evaluation techniques
for Anti-inflammatory, Antiulcer, Anticancer, Wound healing, Antidiabetic, Hepatoprotective, Cardio protective, Diuretics and
Antifertility, Toxicity studies as per OECD guidelines
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
1. [WEBSITE: WWW.FREEILM.C0M1 [NOTES: 9TH COMPUTER - UNIT 1 - LONG QUESTIONS
!
Iriit 1: Problem Solvin;
^HLongQuestions
^l
g
Q.l Define problem analysis. Explain your answer along with an example.
Ans:
The process of understanding the problem for developing its solution is called analyzing the
problem. It is important to understand the problem before jumping into the solution of the
problem,
Identification of the 5 Ws:
Understanding of a problem usually includes identification of the 5 Ws (what, who, when,
where, and why). Problem analysis is the process to figure out these 5 Ws from a problem
statement.
Example 1: Suppose your class teacher assigns you a task to prepare a list of students in your
directory of all school students and there is only one week to complete the task school whose
names start with letter 'A'. The list is required in order to prepare an alphabetical directory of
all school sudents and there is only one week to complete the task.
We can analyze this problem by identifying 5Ws in the problem statement as given below:
• What: List of students names starting with letter 'A':
• Who: Students.
• Why: To prepare the directory of students.
• When: Within a week.
• Where: School
Example 2: Suppose you prepare a list oftop 10% students in computer science subject in your
class within a week. We can analyze this problem by identifying 5Ws in the problem statement
as given below:
• What: A list of top 10% students in computer science subject in your class.
• Who: Students.
• Why: To prepare the list of top 10% students in computer.
• When: Within a week.
• Where: School
Q.2 Define an algorithm and argue on its role and importance in problem solving.
Ans:
An algorithm is a finite set of steps, which, if followed, accomplish a particular task. It is
written in a natural language, so it is easily understandable by humans. Usually an algorithm
takes an input and then after processing produces some output.
Role of Algorithms in Problem Solving
• Formulating an algorithm is the first step for developing a computer program.
[PAGE: 1 OF 181
[WEBSITE: WWW.FREEILM.C0M1 [EMAIL: FREEILM786@GMAIL.C0M1
2. [WEBSITE: WWW.FREEILM.C0M1 [NOTES: 9TH COMPUTER - UNIT 1 - LONG QUESTIONS1
• An algorithm has a vital role in problem solving as it provides a step-by-step guide to
the problem solver.
• It is a complete description of the solution.
• A computer programmer first writes an algorithm and then translates it into the code
of some programming language.
Importance of Algorithms in Problem Solving
• To solve a large problem, algorithms are helpful.
• Easy to write.
• Techniques to write an algorithm are easy to understand.
Example 1: For example, to solve the problem of preparing tea, we can follow the following
steps:
Step 1: Start
Step 2: Take a kettle
Step 3: Pour water in it
Step 4: Put the kettle on fire
Step 5: Add sugar, milk and tea
Step 6: Wait till it boils
Step 7: Remove the kettle from fire
Step 8: End
Example 2: To find the sum, product and average of five given numbers.
Step 1. Start
Step 2. Input numbers, a, b, c, d, e
Step 3. Set sum toa + b + c + d + e
Step 4. Set product t o a x b x c x d x e
Step 5. Set average to (a + b + c + d +e ) / 5
Step 6. Output sum, product, average
Step 7. End
Example 3: To find acceleration of a moving object with given mass and the applied force.
Step 1. Start
Step 2. Input numbers, mass, force
Step 3. Set acceleration to force/ mass
Step 4. Output acceleration
Step 5. End
Example 4: To find the volume of a cube.
Step 1. Start
Step 2. Input number, side
Step 3. Set volume to side x side x side
Step 4. Output volume
Step 5. End
[PAGE: I OF 181
[EMAIL: FREEILM786
@
GMAIL.C0M1
3. [WEBSITE: WWW.FREEILM.C0M1 [NOTES: 9TH COMPUTER - UNIT 1 - LONG QUESTIONS
!
Q.3 Suppose a problem has multiple algorithms. How would you choose the most efficient
one? Explain with example.
Ans:
There can be more than one algorithms to solve the same problem. Which one is better, depends
upon the efficiency ofthe available solution algorithms. Efficiency of an algorithm is measured
on the basis of two metrics:
1. Number of steps: An algorithm is considered more efficient if it takes less number of steps
to reach the results.
2. Space used in computer memory: We have observed in algorithms that some data is stored
in computer memory which is later used to give results. An algorithm using less space in
computer memory is considered more efficient with respect to memory space.
It is quite possible that one algorithmtakes less space in memory and has more number of steps
whereas the other algorithm takes more memory and has less number of steps. Inthis case there
is a trade-off between number of steps and the consumed memory. The designer can take
decision according to the requirements.
Example
Let's suppose we have two algorithms to solve a certain problem. One algorithm has N steps
whereas the other algorithm has N2 steps. In this case the first one is considered more efficient
than the first one.
Example
We need to compute the following.
1 +2 +3 +4 +5 + ... + 99
How can we find its answer?
Different minds can find different solutions to solve this problem.
1. One solution is to start adding numbers from beginning and keep adding till the end.
2. Other solution is to start making pairs as (1 +99), (2 +98), (3 +97), (4 + 96), (5 +95) ...
(49+51) where each pair gives answer 100. We count the number of pairs and multiply that
count with 100 and then in the result we add 50 as it is nowhere in any pair.
3. Another solution is to use formula
n(n+V where n is the last term. So, the solution is just to
99 (99+1)
solve
These examples shows different approaches to solve one problem and if these approaches are
used in computer then accordingly there may be different memory usage and number of steps.
Third step is better because it use less number of stepsto reach the result and also consume less
space in computer memory.
2
Q.4 How do you determine requirements for a flowchart? OR Write steps for drawing a
flowchart.
Ans:
Flowchart is the graphical or visual representation of an algorithm to solve problem using
symbols. The flowchart developer must determine the following requirements for the given
problem or algorithm before drawing a flowchart:
• Input to the flowchart
• Type of processing required
PAGEt 3 OF 181
[WEBSITE: WWW.FREEILM.C0M1 [EMAIL: FREEILM786@GMAIL.C0M1
4. [WEBSITE: WWW.FREEILM.C0M1 [NOTES: 9TH COMPUTER - UNIT 1 - LONG QUESTIONS
!
• Decisions to be taken
• The output to be produced after processing
1. Input: The flowchart developer must know about the input for flowchart.
Example: If the giver problem is to find area of rectangle. Here inputs will be length and width
2. Processing: The flowchart developer must decide whattype of calculation is to be performed
or which formula is to be applied to obtain the required result
Example: To the find the area of rectangle, the following formula is to be used
Area = Length * Width
3. Decision: The flowchart developer must decide which control structures (sequence,
repetition or selection) are to be applied for the solution of the problem.
Example: To find the largest number from any three given numbers...
4. Output: The flowchart must be provide the required output.
Q.5 What is test data? Describe types of test data.
Ans:
Test data is used to test whether the solution of the problem is correct or not. After solving a
problem, we need to test whether the solution is correct or not, and for testing, we need "Test
Data".
Importance of Testing
• Testing is essential to point out the defects and errors made during finding a solution
to some problem.
• It helps in improving a solution. If one solves a problem and someone else uses that
solution for commercial purposes, then the commercial activities depend upon the
correctness of that solution.
Example 1: if we develop a solution for finance management and some bank starts using it
then any error in that solution may result in a financial loss. So, testing is important for a
solution.
Example 2: A car is delivered to a customer after testing. Upon launching a new car, it is
usually tested with a robot driver who hits the car with a wall. It is used to test whether the air
bags and other security systems are functioning or not. Moreover, it also allows the car
designers to suggest further security measures to reduce the damage. This test can help to make
a car safe. So testing helps to improve quality.
Types of Test Data
Following are the types of test data.
Valid test data: It is data that is valid with the input requirement of the algorithm.
Example: If an algorithm is supposed to take a numeric value between 1 and 50 as input, then
any value between 1 and 50 is a valid test data.
Invalid test data: It is data that is invalid with the input requirement of the algorithm.
Example: If an algorithm is supposed to take a numeric value between 1 and 50 as input, but
that input is not between 1 to 50 so it is invalid test data.
Boundary test data values: A solution is tested on extreme values.
Example: To calculate interest we can consider principal amount as 0 or a very huge amount.
Absent data: It is also important to investigate that the solution still works if less number of
inputs are given than expected.
[PAGE; 4 OF 181
[WEBSITE: WWW.FREEILM.C0M1 [EMAIL: FREEILM786@GMAIL.C0M1
5. [WEBSITE: WWW.FREEILM.C0M1 [NOTES: 9TH COMPUTER - UNIT 1 - LONG QUESTIONS
!
Example: If a system asks to enter driving license number, then everyone cannot provide this
information. It is important to see how the system reacts in such situations.
Wrong data formats: It is wise to check how the system reacts on entering data in wrong
format. Example: Giving a numeric value as input when alphabet is expected.
Q.6 Describe identification and correction of errors using a trace table.
Ans:
If an algorithm is failed during verification, then it is important to identify the root cause of
failure and then to correct it. Sometimes the error is logical. It means the solution is working
but not giving required results.
For example, to recruit students for our school volleyball team, we need students having
height between 144 cm and 164 cm. To count qualified students, we develop the following
algorithm.
Step 1. Start
Step 2. Set count to 0
Step 3. Set all heights to [154, 140, 155, 164, 144, 166, 160, 143]
Step 4. For each height in the list all-heights
Step 5. If height > 144 and height < 164 then set count to count + 1
Step 6. Output count
Step 7. Stop
The above algorithm works but does not count all students. There is a deliberate error
on Step 5. The symbol > has been used instead of > before the number 144. So, the students
having height 144cm will not be counted. This is a logical error. We can identify this type of
errors using a trace table.
Trace table:
A trace table is a technique used to test algorithms, in order to make sure that no logical errors
occur while the algorithm is being processed. The table usually takes the form of a multi-
column, multi-row table; with each column showing names of data, and each row showing
values of the data at each step.
Example: To recruit students for our school basketball team, we need students having height
between 144 cm and 164 cm.
Table shows a trace table for the algorithm. The blank means there is no change and —means
that a value is not concerned. In the following table Step 1 has no effect on data. Step 2 is
assigning 0 to count and in Step 3, list all heights is introduced. In Step 4, there is no change in
both count and all heights but the data 154 is stored in height. It is compared in Step 5 and the
value in count is updated if data is in given range. Steps 4 and 5 are repeated for each value as
shown in Table.
Count All heights height
Step 1
Step 2 0
Step 3 [154, 140, 155, 164, 144, 166, 160, 143]
Step 4 154
Step 5 1
PAGEt m OF 181
[WEBSITE: WWW.FREEILM.C0M1 [EMAIL: FREEILM786@GMAIL.C0M1
6. [WEBSITE: WWW.FREEILM.C0M1 [NOTES: 9TH COMPUTER - UNIT 1 - LONG QUESTIONS1
Step 4 140
Step 5 1
Step 4 155
Step 5 2
Step 4 164
Step 5 3
Step 4 144
Step 5 3
Step 4 166
Step 5 3
Step 4 160
Step 5 4
Step 4 143
Step 5 4
Step 6
Step 7
Q.7 What do you mean by problem solving? Describe the problem solving process.
Ans:
Problem: A problem is an obstacle, hurdle, difficulty or challenge, or any situation that needs
to be removed or solved.
Problem solving: Problem - solving is a skill which can be developed by following a well-
organized approach. Programming is also a problem solving activity. Solving problems is the
main task of computer science which is the job of computer programmer. Programmer must
first understand how a human solves a problem then translate it into a set of instructions in a
programming language that a computer can understand and execute.
The following five Steps involved in problem solving process.
1. Defining a Problem
2. Understanding a Problem.
3. Planning a Solution.
4. Defining Candid Solutions.
5. Selecting the Best Solution
1. Defining the Problem
Defining the problems is initial stage of problem solving. A well-defined problem is the one
that does not contain any ambiguities. All the conditions are clearly specified and a clear goal.
When we are going to solve some problem first we need to see whether the problem is defined
well or not. If the problem is not defined well first of all define the problem. If the problem is
not defined well then we can use one of the following strategies to define the problem.
Strategies to define the problem.
• Gain Background Knowledge
[PAGE: 6 OF 181
[EMAIL: FREEILM786
@
GMAIL.C0M1
7. [WEBSITE: WWW.FREEILM.C0M1 [NOTES: 9TH COMPUTER - UNIT 1 - LONG QUESTIONS
!
We try to know the situation and circumstances in which the problem is happening. In
this way, we can identify the given state. It also helps to know what' a good solution
will look like. How we shall be able to measure the solution
• Use Guesses
We try to guess the unknown information through appropriate guesses. These guesses
may be based upon our past experiences.
• Draw a Picture
If the problem is not well-defined, we can draw a picture and fill the undefined
information.
2. Understanding a problem
The process of understanding the problem for developing its solution is called analyzing the
problem. It is important to understand the problem before jumping into the solution of the
problem. Understanding of a problem usually includes identification of the 5 Ws (what, who,
when, where, and why).
Example 1: Suppose your class teacher assigns you a task to prepare a list of students in your
school whose names start with letter 'A'. The list is required in order to prepare an alphabetical
directory of all school students and there is only one week to complete the task.
We can analyze this problem by identifying 5Ws in the problem statement as given below:
• What: List of students names starting with letter 'A'.
• Who: Students.
• Why: To prepare the directory of students.
• When: Within a week.
• Where: School
3. Planning the solution of the problem
Planning the solution of the problem is a creative stage of problem solving. It refers to dividing
the solution into steps and arranging them into proper order that will solve the problem.
Strategies for Planning a Solution
Following are the strategies that depend upon the nature of problem:
• Divide and Conquer: This strategy divides a complex problem into smaller problems.
• Guess, Check and Improve: The designer guesses a solution to a problem and then
checks the correctness of the solution. If the solution is not according to expectations,
then he/she refines the solution.
• Act it Out: In this strategy the designer defines the list of "to-do" tasks. Afterwards
he/she performs the task
• Prototype (Draw): This technique draws a pictorial representation of the solution. It is
not the final solution. However, it may help a designer to understand the important
components of the solution.
4. Candid solutions of a problem
All the possible solutions of a problem that produce correct result are known as candid
solutions. The word candid refers to something spontaneous and unplanned. One can think of
a candid solution anytime. A candid solution can help to save time. It is not necessary that the
candid solution is the actual solution of a problem.
[PAGE: H OF 181
[WEBSITE: WWW.FREEILM.C0M1 [EMAIL: FREEILM786@GMAIL.C0M1
8. [WEBSITE: WWW.FREEILM.C0M1 [NOTES: 9TH COMPUTER - UNIT 1 - LONG QUESTIONS
!
5. Select the best solution
After defining the candid solutions, only one solution can be selected. The selection of final
solution of a problem should be based on the following criteria.
Speed: The selected solution of the problem should be efficient
Cost: The selected solution of the problem should provide a cost-effective way of
implementation.
Complexity: The selected solution ofthe problem should not be complicated. It should contain
minimum number of instructions/simple steps.
Q.8 Explain Candid Solutions with example.
Ans:
The word candid refers to something spontaneous and unplanned. All the possible solutions of
a problem that produce estimated result are known as candid solutions. To find candid solutions
of a problem, programmer has to look for different methods to solve the problem and come up
with several solutions. A candid solution can help to save time It is not necessarythat the candid
solution is actual solution of problem.
Example: If you are asked to find number of students in your school who can play football.
You can estimate by finding football players in your class and then multiplying it by the total
number of classes in your school. Your answer inthis way is the candid solution. To find exact
number of football players, you have to choose some other way, like visiting each class or
getting data from teachers.
Q.9 What are importance of flow chart in solving a problem? Describe symbols that are
used in flowcharting.
Ans:
Flowchart:
Flowchart is the graphical or visual representation of an algorithm to solve problem using
symbols.
Importance of flow chart in solving a problem
• With the help of a flowchart, the logic of an algorithm can be described more
effectively.
• Flowchart illustrates the sequence of operations to be performed to solve a problem in
the form of a diagram.
• Computer programmers draw flowcharts before writing computer programs. It
provides an easy way to analyze and find solutions of problems.
• Once, the flowchart is drawn, it becomes easy to write program in any high level
language.
• The flowchart helps in debugging process.
Flowchart symbols
PAGE; 8 OF 181
[WEBSITE: WWW.FREEILM.C0M1 [EMAIL: FREEILM786@GMAIL.C0M1
9. [WEBSITE: WWW.FREEILM.C0M1 [NOTES: 9TH COMPUTER - UNIT 1 - LONG QUESTIONS1
Symbol Name Description
Flow line this symbol shows the flow of data, information or process in
the flowchart.
Terminal An oval shape symbol that represents the Start and End of a
flowchart.
I I A Rectangle shape symbol is used to represent the process or
action taken or shows all the calculations.
Process
Symbol Name Description
o Decision A diamond represents a decision symbol used for comparison or
a decision. It changes the flow of control and decides a particular
path to be followed.
CD Input/output A parallelogram represents either input or output operation
regardless of the input or output method.
O Connector A small circle represents a connector symbol and is used to join
various parts of a flow chart.
Q. 10 Draw a flowchart to find the sum, product and average of five given numbers.
Ans:
Start
z 7
Input nO, n1, n2, n3, n4
Sum = nO + n1 + n2* n3* n4
Product = nO x n1 x n2 x n3 x n4
Avg = [nO + n1 + n2 + n3 + n4) / 5
z 7
Print Sum, Product, Avg
End
[PAGE
:9 OF 181
[WEBSITE: [EMAIL: FREEILM71 JL.C0M1
10. [WEBSITE: WWW.FREEILM.C0M1 [NOTES: 9TH COMPUTER - UNIT 1 - LONG QUESTIONS1
Q. 11 Draw a flow chart to display the large one out of three given unequal numbers. OR
Draw a flowchart to find largest of three numbers.
Ans:
METHOD 1
Start
> r
Input nO, n1, n2
i r
Large = nO
No
n1 > Large
Yes
Large = n1
Yes
n2 > Large
Large = n2
No
1 r
J Print Large
7
Stop
METHOD 2
[WEBSITE: WWW.FREEILM.C0M1 [PAGE: 18 OF 181
[EMAIL: FREEILM7868GMAIL.C0M1
11.
12.
13. [ WEBSITE: WWW.FREEILM.COMl [NOTES: 9TH COMPUTER - UNIT 1 - LONG QUESTIONS!
Q.13 Draw a flowchart to determine name of a week day form a given number where
weekdays are assumed from Monday to Smiday and their respective numbers from 1 to
7.
Ans:
Start
’r
Input
number day
Mo Yes
y'Piint "Monday
Day is 1
Mo Yes
WPrint"Tuesday
/
Day is 2
i r
-
^rint 'Wednesday
/'’’'
Yes
Mo
Day is 3
v
Mo Yes
/Print "Thursday
/
Day is 4
y
Print "Friday"
/
Mo Yes
Day is 5
-
/Print 'Saturday
/''
Mo Yes
Day is 6
' f
Yes / /
y Print "Sunday"/
Day is 7
1
Mo y y y y y
<
Stop
[PAGE: 13 OF 18l
[ WEBSITE: WWW .FREEILM.C0M1 [ EMAIL: FREEILM7860GMAIL .COM!
14. [ WEBSITE: WWW.FREEILM.COMl [NOTES: 9TH COMPUTER - UNIT 1 - LONG QUESTIONS!
Q. 14 Draw a flowchart to input 5 values one by one and determine if the given value is
odd or even.
Ans:
Start
'f
count = 0
'f
Input number n
i r
Increase count by 1
i f
Rem = n mod 2
Yes Wo
Rem is 0
'r
Print n is even Print n is odd
Wo
Count = 5
Yes
i r
Stop
[PAGE: 14 OF 18l
[ WEBSITE: WWW .FREEILM.C0M1 [ EMAIL: FREEILM786@GMAIL .C0M1
15. [WEBSITE: WWW.FREEILM.C0M1 [NOTES: 9TH COMPUTER - UNIT 1 - LONG QUESTIONS1
Q. 15 Draw a flowchart to find a sequence of odd numbers starting from a given nmnber
till some limit.
Ans:
Start
i r
zInput number n, limit
Rem = n mod 2
Yes Wo
Rem is 0
Increase n by 1
*
Yes No
n < = limit Stop
I
Print n
Increase n by 2
Q.16 What is algorithm? Explain formulation of algorithm with examples.
Ans:
An algorithm is a finite set of steps, which, if followed, accomplish a particular task. It is
written in a natural language, so it is easily understandable by humans. Usually an algorithm
takes an input and then after processing produces some output.
Formulation of an Algorithm
There are different notations (keywords) to write an algorithm given below in table:
[WEBSITE: WWW.FREEILM.C0M1 [EMAIL: FREEILM786
@
GMAIL.C0M1 [PAGE: 15 OF ISl
16. [WEBSITE: WWW.FREEILM.C0M1 [NOTES: 9TH COMPUTER - UNIT 1 - LONG QUESTIONS1
Notation
Start
Meaning
It is the starting point of an algorithm. Every algorithm must have one starting
(entry) point.
It is used to get input from a user and store in computer memory with some
name.
It is used to give name to data in computer memory. It is also used to update the
value of existing data.
It is used to check the condition. For example, the condition like if(a<b).
Condition is evaluated as true or false. In case the condition is true then the
statements related with if part are executed otherwise the statements of else part
are executed. Usage: Suppose a=5 and b=7, if(a<5) Set c to 10 else Set c to
20.Writing else part is optional.
It is used to transfer control to a certain step of an algorithm. It is usually
required in loops.
It is used to display values.
It is the termination point of an algorithm.
Input
Set
if, else
Goto
Output
Stop
Examples of Algorithms
1. To find the area of a parallelogram.
Step 1. Start
Step 2. Input numbers, base, height
Step 3. Set area to base x height
Step 4. Output area
Step 5. End
2. To display the larger one out of the three given numbers.
Step 1. Start
Step 2. Input three numbers, a, b, c
Step 3. Set large to a
Step 4. If b > large Set large to b
Step 5. If c > large Set large to c
Step 6. Output large
Step 7. End
3. To assign grade to a subject based on the achieved marks.
Step 1. Start
Step 2. Input numbers obtained marks, total marks
* 100
obtained, marks
Step 3. Set percentage to
total, marks
Step 4. if percentage > 80 Set grade to A+
else
if percentage > 70 Set grade to A
else
if percentage > 60 Set grade to B
else
if percentage > 50 Set grade to C
else
if percentage > 40 Set grade to D
[PAGE: 1
_6
_0F
_18
]
M
^ITE: [EMAIL: FREEILM7860GMAIL.C0M1
17. [WEBSITE: WWW.FREEILM.C0M1 [NOTES: 9TH COMPUTER - UNIT 1 - LONG QUESTIONS1
else
if percentage > 33 Set grade to E
else
Set grade to F
Step 5. Output grade
Step 6. End
4. To find the interest on an amount
Step 1. Start
Step 2. Input numbers, amount, rate, years
Step 3. Set plain interest to ( amount x ) x years
Step 4. Output plain interest
Step 5. End
5. To convert Celsius (Centigrade) to Fahrenheit temperature and vice versa.
Step 1. Start
Step 2. Input number. Celsius
Step 3. Set Fahrenheit to
Step 4. Output Fahrenheit
Step 5. Input number, Fahrenheit
Step 6. Set Celsius to (Fahrenheit - 32) x
|
Step 7. Output Celsius
Step 8. End
Celsius x9
+ 32
5
6. Find even numbers in integers ranging from nl to n2 (where n2 is greater than nl).
Step 1 Start
Step 2 Input numbers, nl, n2
Step 3 if (nl < n2) {
Step 4 if (nl mod 2 equal 0) output nl
Step 5
Step 6. goto step 3
Set nl to nl + 1
}
Step 7. End
Q.17 Write down advantages and disadvantages of flowchart and algorithm
Ans:
Advantages of Flowchart
• With the help of a flowchart, the logic of an algorithm can be described more
effectively.
• The flowchart helps in debugging process.
• Easy to draw.
• Easy to understand problem solving.
• Easy to observe flow from one step to the other.
M
^ITE: [PAGE: 17
_0
F
_lg
]
[EMAIL: FREEILM786flGMAIL.COM
!
18. [WEBSITE: WWW.FREEILM.C0M1 [NOTES: 9TH COMPUTER - UNIT 1 - LONG QUESTIONS
!
Disadvantages of a Flowchart
• It is difficult to draw flowcharts for complex and large problems.
• More time is required to draw a flowchart.
• Modifying a flowchart is not very easy every time.
Advantages of an Algorithm
• To solve a large problem, algorithms are helpful.
• Easy to write.
• Techniques to write an algorithm are easy to understand.
Disadvantages of an Algorithm
• Showing the flow from one step to the other is not very easy.
• Modifying an existing algorithm is not very easy every time.
• Usage of goto makes it difficult to identify errors.
Q.18 Explain Verification and Validation with help of examples.
Ans:
Verification: Verification means to test ifthe solution is actually solvingthe same problem for
which it was designed.
Example: If you are asked to give a solution for calculating compound interestthen verification
means to know that it is giving results for compound interest not for the plain interest.
Validation: Validation means to test whether the solution is correct or not.
Example 1: If you are asked to give a solution for calculating compound interest then
validation means to know whether it is finding the correct compound interest or not. If a
solution is verified, then it is validated with the help of test data.
Example 2: Let's assume that you go to a pizza shop and order a chicken pizza. You state your
requirement that it should be less spicy. You also expect that it would taste good. When the
pizza arrives, you can observe that it is a chicken pizza. This is called verification. Now, when
you eat the pizza, you can check whether it is less spice or not, it tastes good or not. This is
called validation.
Example 3: Let's assume that you are asked to write an algorithm that takes as input a list of
numbers. The algorithm should display the list arranged in ascending order. After writing the
algorithm you submit it to your teacher. Your teacher provides a list of numbers to the
algorithm.
If your algorithm displays a list of numbers then it is verified. Instead if your algorithm displays
an answer is yes or no, or displays something else, then it is not verified. If your algorithm is
verified, your teacher moves to the next step of validation. He checks whether the list of
numbers displayed are actually in ascending order or not. If the list is in ascending order and
no element is missing then your solution is also validated.
|Report any mistake ?|
at : freeilni786@gmail.com
visit: freeilm.com
[WEBSITE: WWW.FREEILM.C0M1 [PAGE: 13 OF 1
*1
[EMAIL: FREEILM7860GMAIL.C0M1