SlideShare a Scribd company logo
Programming Fundamentals
This Course Problem Solving  Using Computers Implementing the Solution  using a  Programming Language 1 2 The first part is mostly ignored which leads to poor programming skills Programming Fundamentals | Lecture-2
1
Steps in Problem Solving Define the Problem Design the Solution 1 2 Programming Fundamentals | Lecture-2
1. Define the Problem After careful reading, the problem should be divided into three separate components Input Data provided to the problem Output What is required from the solution Processing List of actions needed to produce the required output Programming Fundamentals | Lecture-2
2. Design the Solution Solution of a Problem in your mind Solution in terms of no. of steps Transform There are more than 1 ways to do that but we will use a graphical approach  which will involve usage of Geometrical Shapes  to represent different kinds of steps in a solution Programming Fundamentals | Lecture-2
Example-1 Programming Fundamentals | Lecture-2
Step-1: Define the Problem Programming Fundamentals | Lecture-2 Problem :  Find the sum of two numbers Input Output Processing Number1 Sum Add Numbers Together Number2
Step-2: Design the Solution Start by drawing a “Start” symbol Show a symbol for Input Show process symbol(s) for processing There can be more than 1 such steps depending on the complexity of the problem Show a symbol for Output Finish by drawing a “Stop” Symbol Programming Fundamentals | Lecture-2
Step-2: Design the Solution Programming Fundamentals | Lecture-2 START READ number1, number2 sum = number1 + number2 DISPLAY sum STOP
Legend Programming Fundamentals | Lecture-2 Symbol Meaning Terminal Symbol  (Oval) : indicates the beginning and ending of a program Input-Output Symbol  (Parallelogram): shows an input or an output operation Process Symbol  (Rectangle): shows an instruction other than input or output
Other Simple Examples Find sum of three numbers Division, multiplication, subtraction of two/three numbers Find Average of two numbers Find square of a number Find acceleration for a given velocity and time Find Velocity Programming Fundamentals | Lecture-2
Average of Two Numbers Programming Fundamentals | Lecture-2 START READ number1, number2 sum = number1 + number2 DISPLAY average STOP average = sum / 2
Square of a Number Programming Fundamentals | Lecture-2 START READ number square = number * number DISPLAY square STOP
Acceleration Programming Fundamentals | Lecture-2 START READ v1, v2, t change = v2 – v1 DISPLAY acceleration STOP acceleration = change / t
Velocity Programming Fundamentals | Lecture-2 START READ d1, d2, t1, t2 positionChange = d2 – d1 DISPLAY velocity STOP timeChange = t2 – t1 velocity = postionChange / timeChange
Why to use Computers? Can do many complicated tasks at very high speeds and can store large quantities of data Some Situations Extensive Input Extensive output Method of solution is too complicated to implement manually If done manually, it takes an excessive long time to solve
Tasks  (to be done before next lecture) Calculate area of a rectangle area = base    height Find Cube of a Number Calculate Marks Percentage (marks obtained / total marks)    100 Calculate Sales Tax amount    (tax percent / 100) Find “no. of minutes” and “no. of seconds” for given “no of years” Programming Fundamentals | Lecture-2
Programming Fundamentals | Lecture-2 BE READY  FOR  QUIZ  IN  NEXT LECTURE

More Related Content

PPTX
Introduction to Programming
ALI RAZA
 
PPTX
Algorithm Development
ALI RAZA
 
PPTX
Flowcharts and pseudocodes
Dr Piyush Charan
 
PPTX
Basics of python
JayaShukla23
 
PPTX
Programming preparation_stepping Algorithm
leneinterno
 
PPTX
Programming fundamentals lecture 2 of c
Raja Hamid
 
PPT
Copy of dti2143/dam31303 chap 1 problem solving and program design
alish sha
 
Introduction to Programming
ALI RAZA
 
Algorithm Development
ALI RAZA
 
Flowcharts and pseudocodes
Dr Piyush Charan
 
Basics of python
JayaShukla23
 
Programming preparation_stepping Algorithm
leneinterno
 
Programming fundamentals lecture 2 of c
Raja Hamid
 
Copy of dti2143/dam31303 chap 1 problem solving and program design
alish sha
 

What's hot (20)

PPT
Fundamental Programming Lect 2
Namrah Erum
 
PPTX
Recursion
Kasun Ranga Wijeweera
 
PDF
Algorithm hierarchy
Changyu Yang
 
PDF
Problem solving (C++ Programming)
Umair Younas
 
PDF
Algorithm
farishah
 
PPT
Fundamental Programming Lect 3
Namrah Erum
 
PPT
Fundamental Programming Lect 5
Namrah Erum
 
PPTX
Basic Algorithm @PPSC(1)
Amiya Bhusan
 
PPT
Introduction to problem solving in c++
Online
 
PPTX
Data structures algorithms basics
ayeshasafdar8
 
PPTX
Algorithm & flowchart
saurabh sen sky
 
PPTX
Unit 1. Problem Solving with Computer
Ashim Lamichhane
 
PDF
Problem Solving Techniques and Introduction to C
Prabu U
 
PPTX
Algorithm and flowchart
Elizabeth de Leon Aler
 
PPTX
Our presentation on algorithm design
Nahid Hasan
 
PPT
Fundamental Programming Lect 4
Namrah Erum
 
DOCX
Lecture1
Andrew Raj
 
PDF
Algo and flowchart
Swapnil Suryavanshi
 
PPTX
Lecture 3 time complexity
Abirami A
 
PPTX
Algorithm and Flowcharts
Dr. SURBHI SAROHA
 
Fundamental Programming Lect 2
Namrah Erum
 
Algorithm hierarchy
Changyu Yang
 
Problem solving (C++ Programming)
Umair Younas
 
Algorithm
farishah
 
Fundamental Programming Lect 3
Namrah Erum
 
Fundamental Programming Lect 5
Namrah Erum
 
Basic Algorithm @PPSC(1)
Amiya Bhusan
 
Introduction to problem solving in c++
Online
 
Data structures algorithms basics
ayeshasafdar8
 
Algorithm & flowchart
saurabh sen sky
 
Unit 1. Problem Solving with Computer
Ashim Lamichhane
 
Problem Solving Techniques and Introduction to C
Prabu U
 
Algorithm and flowchart
Elizabeth de Leon Aler
 
Our presentation on algorithm design
Nahid Hasan
 
Fundamental Programming Lect 4
Namrah Erum
 
Lecture1
Andrew Raj
 
Algo and flowchart
Swapnil Suryavanshi
 
Lecture 3 time complexity
Abirami A
 
Algorithm and Flowcharts
Dr. SURBHI SAROHA
 
Ad

Viewers also liked (6)

PDF
Lecture 1:Concepts of an Nonrenewable Nonmetallic Mineral Resources
Geology Department, Faculty of Science, Tanta University
 
PDF
Egyptian Islands الجزر المصرية
Geology Department, Faculty of Science, Tanta University
 
PPT
Lifestyle diseases
collink411
 
PDF
TEDx Manchester: AI & The Future of Work
Volker Hirsch
 
Lecture 1:Concepts of an Nonrenewable Nonmetallic Mineral Resources
Geology Department, Faculty of Science, Tanta University
 
Egyptian Islands الجزر المصرية
Geology Department, Faculty of Science, Tanta University
 
Lifestyle diseases
collink411
 
TEDx Manchester: AI & The Future of Work
Volker Hirsch
 
Ad

Similar to Cs 1114 - lecture-2 (20)

PPTX
Cs1123 2 comp_prog
TAlha MAlik
 
PPT
Computer Programming Computer Programming
arifhasan88
 
PPT
Cs 1114 - lecture-3
Zeeshan Sabir
 
PPSX
CC-112-Lec.1.ppsx
Aamir Shahzad
 
PPTX
Problem Solving PPT Slides Grade 10- 11students
chamm5
 
PPT
Cs 1114 - lecture-4
Zeeshan Sabir
 
PPT
Cs 1114 - lecture-9
Zeeshan Sabir
 
PPT
Computer Programming - Lecture 2
Dr. Md. Shohel Sayeed
 
PPTX
Introduction.pptx
ssusera8c91a
 
PPTX
Teaching of computer programming
marpasha
 
PPTX
Basic pogramming concepts
Anurag Prajapat
 
PPT
Cs 1114 - lecture-1
Zeeshan Sabir
 
PPT
Programming Fundamentals - Lecture 1.ppt
FarhanGhafoor7
 
PPT
Introduction to Programming
Chaffey College
 
PPTX
Algorithm Design and Problem Solving [Autosaved].pptx
KaavyaGaur1
 
PPTX
Software fundamentals
Susan Winters
 
DOC
Unit 2
rohassanie
 
PPTX
MODULE1-INTRODUCTION.pptx-COMPUTER PROGRAMING
MarcMiguel2
 
PPTX
vingautosaved-230525024624-6a6fb3b2.pptx
Orin18
 
PPTX
Pj01 1-computer and programming fundamentals
SasidharaRaoMarrapu
 
Cs1123 2 comp_prog
TAlha MAlik
 
Computer Programming Computer Programming
arifhasan88
 
Cs 1114 - lecture-3
Zeeshan Sabir
 
CC-112-Lec.1.ppsx
Aamir Shahzad
 
Problem Solving PPT Slides Grade 10- 11students
chamm5
 
Cs 1114 - lecture-4
Zeeshan Sabir
 
Cs 1114 - lecture-9
Zeeshan Sabir
 
Computer Programming - Lecture 2
Dr. Md. Shohel Sayeed
 
Introduction.pptx
ssusera8c91a
 
Teaching of computer programming
marpasha
 
Basic pogramming concepts
Anurag Prajapat
 
Cs 1114 - lecture-1
Zeeshan Sabir
 
Programming Fundamentals - Lecture 1.ppt
FarhanGhafoor7
 
Introduction to Programming
Chaffey College
 
Algorithm Design and Problem Solving [Autosaved].pptx
KaavyaGaur1
 
Software fundamentals
Susan Winters
 
Unit 2
rohassanie
 
MODULE1-INTRODUCTION.pptx-COMPUTER PROGRAMING
MarcMiguel2
 
vingautosaved-230525024624-6a6fb3b2.pptx
Orin18
 
Pj01 1-computer and programming fundamentals
SasidharaRaoMarrapu
 

More from Zeeshan Sabir (8)

PPT
Cs 1114 - lecture-10
Zeeshan Sabir
 
PPT
Cs 1114 - lecture-8
Zeeshan Sabir
 
PPT
Cs 1114 - lecture-7
Zeeshan Sabir
 
PPT
Cs 1114 - lecture-6
Zeeshan Sabir
 
PPT
Cs 1114 - lecture-5
Zeeshan Sabir
 
PPT
Cs 1114 - lecture-29
Zeeshan Sabir
 
PPT
Final logic presentation
Zeeshan Sabir
 
PPT
Human resource management process
Zeeshan Sabir
 
Cs 1114 - lecture-10
Zeeshan Sabir
 
Cs 1114 - lecture-8
Zeeshan Sabir
 
Cs 1114 - lecture-7
Zeeshan Sabir
 
Cs 1114 - lecture-6
Zeeshan Sabir
 
Cs 1114 - lecture-5
Zeeshan Sabir
 
Cs 1114 - lecture-29
Zeeshan Sabir
 
Final logic presentation
Zeeshan Sabir
 
Human resource management process
Zeeshan Sabir
 

Recently uploaded (20)

PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
PDF
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PPTX
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
The Future of Artificial Intelligence (AI)
Mukul
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 

Cs 1114 - lecture-2

  • 2. This Course Problem Solving Using Computers Implementing the Solution using a Programming Language 1 2 The first part is mostly ignored which leads to poor programming skills Programming Fundamentals | Lecture-2
  • 3. 1
  • 4. Steps in Problem Solving Define the Problem Design the Solution 1 2 Programming Fundamentals | Lecture-2
  • 5. 1. Define the Problem After careful reading, the problem should be divided into three separate components Input Data provided to the problem Output What is required from the solution Processing List of actions needed to produce the required output Programming Fundamentals | Lecture-2
  • 6. 2. Design the Solution Solution of a Problem in your mind Solution in terms of no. of steps Transform There are more than 1 ways to do that but we will use a graphical approach which will involve usage of Geometrical Shapes to represent different kinds of steps in a solution Programming Fundamentals | Lecture-2
  • 8. Step-1: Define the Problem Programming Fundamentals | Lecture-2 Problem : Find the sum of two numbers Input Output Processing Number1 Sum Add Numbers Together Number2
  • 9. Step-2: Design the Solution Start by drawing a “Start” symbol Show a symbol for Input Show process symbol(s) for processing There can be more than 1 such steps depending on the complexity of the problem Show a symbol for Output Finish by drawing a “Stop” Symbol Programming Fundamentals | Lecture-2
  • 10. Step-2: Design the Solution Programming Fundamentals | Lecture-2 START READ number1, number2 sum = number1 + number2 DISPLAY sum STOP
  • 11. Legend Programming Fundamentals | Lecture-2 Symbol Meaning Terminal Symbol (Oval) : indicates the beginning and ending of a program Input-Output Symbol (Parallelogram): shows an input or an output operation Process Symbol (Rectangle): shows an instruction other than input or output
  • 12. Other Simple Examples Find sum of three numbers Division, multiplication, subtraction of two/three numbers Find Average of two numbers Find square of a number Find acceleration for a given velocity and time Find Velocity Programming Fundamentals | Lecture-2
  • 13. Average of Two Numbers Programming Fundamentals | Lecture-2 START READ number1, number2 sum = number1 + number2 DISPLAY average STOP average = sum / 2
  • 14. Square of a Number Programming Fundamentals | Lecture-2 START READ number square = number * number DISPLAY square STOP
  • 15. Acceleration Programming Fundamentals | Lecture-2 START READ v1, v2, t change = v2 – v1 DISPLAY acceleration STOP acceleration = change / t
  • 16. Velocity Programming Fundamentals | Lecture-2 START READ d1, d2, t1, t2 positionChange = d2 – d1 DISPLAY velocity STOP timeChange = t2 – t1 velocity = postionChange / timeChange
  • 17. Why to use Computers? Can do many complicated tasks at very high speeds and can store large quantities of data Some Situations Extensive Input Extensive output Method of solution is too complicated to implement manually If done manually, it takes an excessive long time to solve
  • 18. Tasks (to be done before next lecture) Calculate area of a rectangle area = base  height Find Cube of a Number Calculate Marks Percentage (marks obtained / total marks)  100 Calculate Sales Tax amount  (tax percent / 100) Find “no. of minutes” and “no. of seconds” for given “no of years” Programming Fundamentals | Lecture-2
  • 19. Programming Fundamentals | Lecture-2 BE READY FOR QUIZ IN NEXT LECTURE