SlideShare a Scribd company logo
1 of 19
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 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],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 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],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 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],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? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Tasks  (to be done before next lecture) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Programming Fundamentals | Lecture-2
Programming Fundamentals | Lecture-2 BE READY  FOR  QUIZ  IN  NEXT LECTURE

More Related Content

What's hot

Algorithm
AlgorithmAlgorithm
Algorithm
farishah
 
Our presentation on algorithm design
Our presentation on algorithm designOur presentation on algorithm design
Our presentation on algorithm design
Nahid Hasan
 

What's hot (20)

Fundamental Programming Lect 2
Fundamental Programming Lect 2Fundamental Programming Lect 2
Fundamental Programming Lect 2
 
Recursion
RecursionRecursion
Recursion
 
Algorithm hierarchy
Algorithm hierarchyAlgorithm hierarchy
Algorithm hierarchy
 
Problem solving (C++ Programming)
Problem solving (C++ Programming)Problem solving (C++ Programming)
Problem solving (C++ Programming)
 
Algorithm
AlgorithmAlgorithm
Algorithm
 
Fundamental Programming Lect 3
Fundamental Programming Lect 3Fundamental Programming Lect 3
Fundamental Programming Lect 3
 
Fundamental Programming Lect 5
Fundamental Programming Lect 5Fundamental Programming Lect 5
Fundamental Programming Lect 5
 
Basic Algorithm @PPSC(1)
Basic Algorithm @PPSC(1)Basic Algorithm @PPSC(1)
Basic Algorithm @PPSC(1)
 
Introduction to problem solving in c++
Introduction to problem solving in c++Introduction to problem solving in c++
Introduction to problem solving in c++
 
Data structures algorithms basics
Data structures   algorithms basicsData structures   algorithms basics
Data structures algorithms basics
 
Algorithm & flowchart
Algorithm & flowchartAlgorithm & flowchart
Algorithm & flowchart
 
Unit 1. Problem Solving with Computer
Unit 1. Problem Solving with Computer   Unit 1. Problem Solving with Computer
Unit 1. Problem Solving with Computer
 
Problem Solving Techniques and Introduction to C
Problem Solving Techniques and Introduction to CProblem Solving Techniques and Introduction to C
Problem Solving Techniques and Introduction to C
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 
Our presentation on algorithm design
Our presentation on algorithm designOur presentation on algorithm design
Our presentation on algorithm design
 
Fundamental Programming Lect 4
Fundamental Programming Lect 4Fundamental Programming Lect 4
Fundamental Programming Lect 4
 
Lecture1
Lecture1Lecture1
Lecture1
 
Algo and flowchart
Algo and flowchartAlgo and flowchart
Algo and flowchart
 
Lecture 3 time complexity
Lecture 3 time complexityLecture 3 time complexity
Lecture 3 time complexity
 
Algorithm and Flowcharts
Algorithm and FlowchartsAlgorithm and Flowcharts
Algorithm and Flowcharts
 

Viewers also liked

Lifestyle diseases
Lifestyle diseasesLifestyle diseases
Lifestyle diseases
collink411
 

Viewers also liked (6)

Lecture 1:Concepts of an Nonrenewable Nonmetallic Mineral Resources
Lecture 1:Concepts of an Nonrenewable Nonmetallic Mineral ResourcesLecture 1:Concepts of an Nonrenewable Nonmetallic Mineral Resources
Lecture 1:Concepts of an Nonrenewable Nonmetallic Mineral Resources
 
Lecture one applied mineralogy
Lecture one applied mineralogyLecture one applied mineralogy
Lecture one applied mineralogy
 
Egyptian Islands الجزر المصرية
Egyptian Islands  الجزر المصريةEgyptian Islands  الجزر المصرية
Egyptian Islands الجزر المصرية
 
Zeolite and its uses
 Zeolite and its uses Zeolite and its uses
Zeolite and its uses
 
Lifestyle diseases
Lifestyle diseasesLifestyle diseases
Lifestyle diseases
 
TEDx Manchester: AI & The Future of Work
TEDx Manchester: AI & The Future of WorkTEDx Manchester: AI & The Future of Work
TEDx Manchester: AI & The Future of Work
 

Similar to Cs 1114 - lecture-2

8.2 approach in problem solving (9 hour)
8.2 approach in problem solving (9 hour)8.2 approach in problem solving (9 hour)
8.2 approach in problem solving (9 hour)
Fiqry Suryansyah
 
Programming
ProgrammingProgramming
Programming
Syahida
 
Ict - Programming
Ict - ProgrammingIct - Programming
Ict - Programming
aleeya91
 
Cs1123 2 comp_prog
Cs1123 2 comp_progCs1123 2 comp_prog
Cs1123 2 comp_prog
TAlha MAlik
 

Similar to Cs 1114 - lecture-2 (20)

Algorithm.pdf
Algorithm.pdfAlgorithm.pdf
Algorithm.pdf
 
Problem solving methodology
Problem solving methodologyProblem solving methodology
Problem solving methodology
 
8.2 approach in problem solving (9 hour)
8.2 approach in problem solving (9 hour)8.2 approach in problem solving (9 hour)
8.2 approach in problem solving (9 hour)
 
Pj01 1-computer and programming fundamentals
Pj01 1-computer and programming fundamentalsPj01 1-computer and programming fundamentals
Pj01 1-computer and programming fundamentals
 
Programming
ProgrammingProgramming
Programming
 
Ict - Programming
Ict - ProgrammingIct - Programming
Ict - Programming
 
Basic Slides on Algorithms and Flowcharts
Basic Slides on Algorithms and FlowchartsBasic Slides on Algorithms and Flowcharts
Basic Slides on Algorithms and Flowcharts
 
Programing Fundamental
Programing FundamentalPrograming Fundamental
Programing Fundamental
 
Computer Programming Computer Programming
Computer Programming Computer ProgrammingComputer Programming Computer Programming
Computer Programming Computer Programming
 
3 algorithm-and-flowchart
3 algorithm-and-flowchart3 algorithm-and-flowchart
3 algorithm-and-flowchart
 
Lecture1-Algorithms-and-Flowcharts-ppt.ppt
Lecture1-Algorithms-and-Flowcharts-ppt.pptLecture1-Algorithms-and-Flowcharts-ppt.ppt
Lecture1-Algorithms-and-Flowcharts-ppt.ppt
 
CHAPTER 1
CHAPTER 1CHAPTER 1
CHAPTER 1
 
Cs1123 2 comp_prog
Cs1123 2 comp_progCs1123 2 comp_prog
Cs1123 2 comp_prog
 
Practical 01 (detailed)
Practical 01 (detailed)Practical 01 (detailed)
Practical 01 (detailed)
 
AlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdfAlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdf
 
CSC1100 - Chapter12 - Flow Charts
CSC1100 - Chapter12 - Flow ChartsCSC1100 - Chapter12 - Flow Charts
CSC1100 - Chapter12 - Flow Charts
 
Chapter 02 - Problem Solving
Chapter 02 - Problem SolvingChapter 02 - Problem Solving
Chapter 02 - Problem Solving
 
Logic Development and Algorithm.
Logic Development and Algorithm.Logic Development and Algorithm.
Logic Development and Algorithm.
 
Unit 1 python (2021 r)
Unit 1 python (2021 r)Unit 1 python (2021 r)
Unit 1 python (2021 r)
 
la5-programming-f5.ppt
la5-programming-f5.pptla5-programming-f5.ppt
la5-programming-f5.ppt
 

More from Zeeshan Sabir

More from Zeeshan Sabir (12)

Cs 1114 - lecture-10
Cs 1114 - lecture-10Cs 1114 - lecture-10
Cs 1114 - lecture-10
 
Cs 1114 - lecture-9
Cs 1114 - lecture-9Cs 1114 - lecture-9
Cs 1114 - lecture-9
 
Cs 1114 - lecture-8
Cs 1114 - lecture-8Cs 1114 - lecture-8
Cs 1114 - lecture-8
 
Cs 1114 - lecture-7
Cs 1114 - lecture-7Cs 1114 - lecture-7
Cs 1114 - lecture-7
 
Cs 1114 - lecture-6
Cs 1114 - lecture-6Cs 1114 - lecture-6
Cs 1114 - lecture-6
 
Cs 1114 - lecture-4
Cs 1114 - lecture-4Cs 1114 - lecture-4
Cs 1114 - lecture-4
 
Cs 1114 - lecture-3
Cs 1114 - lecture-3Cs 1114 - lecture-3
Cs 1114 - lecture-3
 
Cs 1114 - lecture-1
Cs 1114 - lecture-1Cs 1114 - lecture-1
Cs 1114 - lecture-1
 
Cs 1114 - lecture-5
Cs 1114 - lecture-5Cs 1114 - lecture-5
Cs 1114 - lecture-5
 
Cs 1114 - lecture-29
Cs 1114 - lecture-29Cs 1114 - lecture-29
Cs 1114 - lecture-29
 
Final logic presentation
Final logic presentationFinal logic presentation
Final logic presentation
 
Human resource management process
Human resource management processHuman resource management process
Human resource management process
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

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.
  • 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.
  • 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.
  • 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.
  • 18.
  • 19. Programming Fundamentals | Lecture-2 BE READY FOR QUIZ IN NEXT LECTURE