(CSC 113)
Lecture One - introduction
Faculty of computing
Department of computer science
Dennis osadebay university, anwai
Asaba, delta state
1
Computer programming i
Specific Objectives
2
Know the meaning of a problem and problem solving methods
Identify problem solving techniques
Specific Describe the programming language styles
objectives
Implement real-world problems using python programming language
CSC 112
Computer programming i
Problem solving Methodologies
Know the concept of a problem and problem solving methods/techniques 3
Identify problem solving strategies
Module 1 Demonstrate problem solving stages and processes – like algorithm, flowchart and pseudocode
Differentiate between human versus computers in solving problems
CSC 112
Computer programming i
Describe programming language styles – part A
Introduction to python programming language 4
Definition and introduction of variables, operators, expressions, statements, compiler, interpreter,
Module 2 keyword, header files etc.
Control flow constructs like:
Decisions: if statement, if else statement, nested if statement
Loop: for loop statement, while loop statement, do-while loop statement, nested loop
statements.
Unconditional jump statements
CSC 112
Computer programming i
Describe programming language styles – Part B
5
Functions
Introduction to array
Module 3 Introduction to string and string processing
Introduction to searching and sorting concepts
structures
CSC 112
Computer programming i
Implement real-world problems using programming language
Generate problems 6
Analyse the problems
Module 4 Design the problems
Implement the problems by writing simple python programs
CSC 112
Computer programming i
What is a problem?
A problem is defined as an objective or specific output that we want to attain through a sequence of
7
steps and activities and with specific inputs.
Example:
Output or specific objective:
Baking of cake according to a user specification
inputs available: Activities or Specific
Input steps output
Ingredients like eggs, flour, milk, sugar etc
Steps or activities:
The steps and activities are done sequentially. These steps and activities are the actions taken to
achieve the specific objective.
Example: putting sugar
CSC 112
Computer programming i
What is Problem solving?
Problem solving is the process of identifying a problem, developing an algorithm for the identified 8
problem and finally, implementing the algorithm to develop a computer program.
The problem solving stages identify the sequential process that will be taken in solving a problem.
These include:
Understanding the problem
Analyzing the problem
Developing the solution
Coding and implementation
Documentation of the procedures
CSC 112
Computer programming i
Understanding a problem
9
Here we try to understand the problem to be solved by identifying the available input, expected or
required output and the operations (arithmetic and logical) to be executed.
CSC 112
Computer programming i
Analyzing a problem
10
After understanding thoroughly the problem to be solve, we look at different ways or methods of
solving the problem and evaluate each of these steps.
The idea here is to search for an appropriate solution to the problem under consideration.
The end result of this stage is a broad overview of the sequence of operations that are to be taken to
be carried out to solve the given problem.
By analyzing a problem, we should be able to figure out what are the inputs and the outputs that it
should produce.
CSC 112
Computer programming i
Developing the solution of a problem
Here the overview of the sequence of operations, that is result of the analysis stage, is expanded 11
to form a detailed step by step solution to the problem under consideration.
The sequential steps is called Algorithm.
An algorithm is defined as a group of logically arranged procedures or steps to be executed to
attain a goal or precise output – out of the specific inputs given.
CSC 112
Computer programming i
Coding and implementation
12
The last stage of problem solving is the conversion of the detailed sequence of operations
(algorithm/flowchart) into a programming language that the computer can understand
Here, each step of the algorithm/flowchart is translated or converted into its equivalent instruction or
instructions in the computer language that has been chosen for the implementation.
This include:
Program design (coding)
Program implementation
The design phase involves the translation of the steps into equivalent instructions in the programming
language like C++, C, C#, Java and Visual Basic.
CSC 112
Computer programming i
Coding and implementation
13
Testing and debugging involves the testing of the code to see if it meets the requirement
specifications of the users.
It ensures that the program generates the correct output for all possible inputs.
In the presence of syntactical errors, no output will be obtained
If the output is incorrect, then the program should be checked for logical error.
CSC 112
Computer programming i
Program Documentation
14
Documentation is beneficial when more than one person participate in writing or modifying the
program.
Program documentation is a document that describes the configuration files, instructions and other
files that explain the program.
CSC 112
Computer programming i
Human versus computers in solving problem
15
People either converges or divergences in thinking to solving a problem or they do both.
Convergent thinking involves evaluating ideas and narrowing or reducing one’s options through the
imposition of value judgement, exploiting the information available about the ideas and then
prioritizing and selecting.
Divergent thinking operations involve searching for ideas and increasing one’s options through
elaboration of the problem and by exploring, connecting and/or combining potential ideas and
solution.
CSC 112
Computer programming i
Exploration and exploitation
16
Exploration is about searching for few ideas both inside or outside the paradigm.
Exploitation is about taking advantages of an idea within the paradigm and perfecting it
Some business problems require mostly exploitation, while other require mostly exploration, but
all problems require some mixture of the two.
Computer solves problem using ALGORITHM.
CSC 112
17
THANK YOU
FOR
LISTENING
THE END