Jawad Muhammad Ali
49 pages
Jawad Muhammad Ali
49 pages
230
/ 49
FEDERAL UNIVERSITY DUTSE
DEPARTMENT OF COMPUTER
SCIENCE,
FACULTY OF COMPUTING
CSC 102: INTRODUCTION TO
PROBLEM SOLVING
This lecture material is prepared to introduce and acquaint students with the basic knowledge of
problem solving alongside the tools. In addition, the fundamentals of python programming
language are also highlighted. Importantly, the materials are gathered from Books, Journals and
Web resources.
Lecture 1
Problem Solving Methods
Objectives:
After going through this topic, students would be able to:
Understand meaning of problem
Understand the concept of Problem-Solving Method
Analyse the process of Problem-Solving Method
Overview
Problem-solving (PS) skills are needed in all areas of life, including classroom problem
solving activities. The capacity to decisively analyse a problem, and set up an effective
solution is one of the most valuable skills one can acquire in life, in school, work or in social
circle. Training in this regard promotes cognitive, social development, and can prepare
students with the skills needed to address and solve problems all the way through the rest of
their lives. In reality, whatever activity human being or machine do to achieve a specified
objective comes under problem solving.
1. Problem - Meaning
A problem is a task. Generally, problem is a kind of barrier to achieve something and
problem solving is a process to get that barrier removed by performing some sequence of
activities. Thus, PS is an act of defining a problem; determining the cause of the problem;
identifying, prioritizing and selecting alternatives for a solution; and implementing the
solution.
Learning in a problem-solving method is by working on problems. Students learn new
knowledge by solving problems. This is done through observation, understanding, analysing,
interpreting to find solutions, and performing applications that would give insight to a holistic
understanding of the concepts. Overall, PS is a process - ability to work from known and
discover unknown. Examples of PS:
Example 1: A simple example on input/process/output. Calculate the average grade for all
students in a class.
Input: get all the grades perhaps by typing them in via the keyboard or by reading them
from a USB flash drive or hard disk.
Process: add them all up and compute the average grade.
Output: output the answer to either the monitor, to the printer, to the USB flash drive or hard
disk or a combination of any of these devices. To solve the problem, understand the
problem. Thus, these questions?
What input data/information is available?
What does it represent?
What format is it in?
Is anything missing?
Do I have everything that I need?
What output information am I trying to produce?
What do I want the result to look like … text, a picture, a graph … ?
What am I going to have to compute?
In the example,
the input is a bunch of grades
we need to understand the format of the grades
each grade might be a number from 0 to 100
it may be a letter grade from A+ to F
If it is a number, the grade might be a whole integer like 73 or it may be a real number
like 73.42
need to consider missing grades, if we do not have the grade for every student (e.g.,
some were away during the test) ??
understand what the output should be (output a whole or real number or a letter grade
?)
display results using charts
The need to understand the processing part of the problem. Break the problem into smaller
problems that require some kind of simple mathematical computations in order to process the
data since we are going to compute the average. So, what is the model (or formula) for
computing the average of a bunch of numbers????? If there is no such “formula”, then, need
to develop one. Sometimes, we can look up certain formulas in a book or online if we get
stuck.
/ 49
End of Document
230