CSC 102 Lecture 1
CSC 102 Lecture 1
LECTURE 1
Introduction to the core concepts of
computing: Problems and problem-solving.
What is Computing?
Definition: The process of using computer technology to complete a task.
It involves the design, development, and use of computer systems,
software, and networks for the processing of data and information.
Key Areas: Software
Engineering
Computer Science: Theoretical foundations, algorithms, and computing Information
systems.
Cybersecurity
Technology
Evolution of Computers
Mechanical Devices: Abacus, mechanical calculators (Pascaline, Leibniz wheel)
Electromechanical Devices: IBM Mark I, relay-based machines
Electronic Computers: ENIAC, UNIVAC
Modern Digital Systems: Microprocessors, personal computers, smartphones
Key Milestones and Pioneers
Charles Babbage: Concept of the Analytical Engine
Alan Turing: Turing machine, father of theoretical computer science
John von Neumann: von Neumann architecture
Bill Gates & Steve Jobs: Personal computing revolution
4
History of Computer
Generations of computers
S/N Generation Component Used
5 Fifth Generation (1980 – till today ) Ultra Scale Integrated Circuits (ULSI) Micro
Processor (SILICON CHIP)
5
BASIC COMPUTER COMPONENTS
8
COMPUTING ENTITIES
10
Tools for Problem Solving
11
Problem-Solving Strategies
Decomposition: Breaking down complex problems into manageable parts
•Example: Breaking down the task of creating a website into design, development, and testing phases.
What is Problem-Solving?
Definition: Problem-solving is the sequential process of analyzing information
related to a given situation and generating appropriate response options.
Problem-solving in computing involves using computational thinking, algorithms,
and tools to analyze, design, and implement solutions to identified problems.
Key Aspects of Problem-Solving
Computational Thinking: Applying principles like decomposition, pattern
recognition, and abstraction to break down problems and devise efficient
solutions.
Algorithm Design: Creating step-by-step procedures or algorithms to solve
specific tasks or problems.
Implementation: Translating algorithms into code using programming languages
and leveraging appropriate tools and technologies.
Evaluation and Optimization: Testing, refining, and optimizing solutions based on 14
performance metrics and user feedback.
Computers as a problem solving tool
15
Systematic approach to solving problems
16
A problem scenario
The first step to solving any problem is to make sure that you
understand the problem that you are trying to solve. One
needs to know:
1. What input data/information is available?
2. What does it represent?
3. What format is it in?
4. Is anything missing?
5. Do I have everything that I need?
6. What output information am I trying to produce?
7. What do I want the result to look like text, a picture, a graph?
8. What am I going to have to compute? 18
Understand the Problem
In our example, we well understand that the input is a bunch of grades. But we need to
understand the format of the grades.
Each grade might be a number from 0 to 100 or 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.
We need to understand the format of the grades in order to solve the problem.
We also need to consider missing grades. What if we do not have the grade for every student
(e.g., some were away during the test) ? Do we want to be able to include that person in our
average (i.e., they received 0) or ignore them when computing the average ?
We also need to understand what the output should be. Again, there is a formatting issue.
Should we output a whole or real number or a letter grade ? Maybe we want to display a pie
chart with the average grade. It is our choice.
Finally, we should understand the kind of processing that needs to be performed on the data.
This leads to the next step 19
Formulate a model
23
Pseudocode Vs Flowchart
1. set the sum of the grade values to 0. int sum = 0; int sum = 0;
26
Test the Program
Once you have a program written that compiles, you need to make sure that it
solves the problem that it was intended to solve and that the solutions are correct.
Therefore the program is run in order to evaluate the compiled instructions.
After running the program, if all is well, then a correct output displayed.
It is possible however, that the program works correctly for some set of data input
but not for all.
If the output of the program is incorrect,
it is possible that the algorithm was not converted properly into a proper program.
It is also possible that the algorithm itself is flawed.
Or some instructions where written and performed out of sequence.
Whatever happened, such problems with your program are known as bugs. 27
Test the Program
Bugs are problems/errors with a program that cause it to stop working or produce
incorrect or undesirable results.
One should fix as many bugs in ones program as possible.
To find bugs effectively, the program must be evaluated with many test cases
(called a test suite).
It is also a good idea to have a third-party test ones program because they may
think up situations or input data that the writer may never have thought of.
The process of finding and fixing errors in your code is called debugging and it is
often a very time-consuming “chore” when it comes to being a programmer.
If one takes time to carefully follow problem solving steps 1 through 3, this should
greatly reduce the amount of bugs in ones programs and it should make
debugging much easier. 28
Discussion
29