SlideShare uma empresa Scribd logo
1 de 22
Programming Fundamentals
Tasks  (from previous lecture) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Programming Fundamentals | Lecture-3
Power of Computer Programs ,[object Object],[object Object],[object Object],Programming Fundamentals | Lecture-3 Now We Will Further Explore Their Power
Consider this Problem ,[object Object],[object Object],Programming Fundamentals | Lecture-3
Difference of Two numbers Programming Fundamentals | Lecture-3 START READ number1, number2 difference = number1 - number2 DISPLAY difference STOP Will result in a negative value if number1 is smaller than number2
Is This Solution Correct? Programming Fundamentals | Lecture-3 START READ number1, number2 difference = number1 - number2 DISPLAY difference STOP difference = difference * -1
Analyze the Problem ,[object Object],[object Object],[object Object],[object Object],[object Object],Programming Fundamentals | Lecture-3
What is to be Done? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Programming Fundamentals | Lecture-3
Should we design  two different solutions? Programming Fundamentals | Lecture-1
What is Required? ,[object Object],[object Object],Programming Fundamentals | Lecture-3
Decision Box Programming Fundamentals | Lecture-3 Decision Rule Yes No Always in the form whose answer is  “ Yes” or “No”
Programming Fundamentals | Lecture-3 START READ number1, number2 difference = number1 - number2 DISPLAY difference STOP difference = difference * -1 difference < 0 Yes No
Power of Computers ,[object Object],[object Object],[object Object],[object Object],Programming Fundamentals | Lecture-3
Another Example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Programming Fundamentals | Lecture-3
Programming Fundamentals | Lecture-3 START READ number1, number2 DISPLAY smaller STOP smaller = number1 number1 < number2 Yes No smaller = number2
Alternative Programming Fundamentals | Lecture-3 START READ number1, number2 STOP DISPLAY number1 number1 < number2 Yes No DISPLAY number2
Comparison Operators ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Programming Fundamentals | Lecture-3
Output a Message Programming Fundamentals | Lecture-3 DISPLAY “This is a message”
Try it Yourself ,[object Object],[object Object],[object Object],Programming Fundamentals | Lecture-3
Some Keywords ,[object Object],[object Object],[object Object],[object Object],Programming Fundamentals | Lecture-3
Tasks  (to be done by next lecture) ,[object Object],[object Object],[object Object],[object Object],[object Object],Programming Fundamentals | Lecture-3
Programming Fundamentals | Lecture-2 BE PREPARED FOR  QUIZ  IN  NEXT LECTURE

Mais conteúdo relacionado

Mais procurados

Numerical expressions.
Numerical expressions.Numerical expressions.
Numerical expressions.Amna Abunamous
 
Mental Math Works
Mental Math WorksMental Math Works
Mental Math WorksLS13527
 
Order Of Operations
Order Of OperationsOrder Of Operations
Order Of Operationsmmeddin
 
Classifying Triangles
Classifying TrianglesClassifying Triangles
Classifying TrianglesAmanda Casto
 
Patterns and sequences
Patterns and sequencesPatterns and sequences
Patterns and sequencesLea Perez
 
Patterns and sequences
Patterns and sequencesPatterns and sequences
Patterns and sequencesJohn Jacobs
 
The Interpretation Of Quartiles And Percentiles July 2009
The Interpretation Of Quartiles And Percentiles   July 2009The Interpretation Of Quartiles And Percentiles   July 2009
The Interpretation Of Quartiles And Percentiles July 2009Maggie Verster
 
Introduction to Percent
Introduction to PercentIntroduction to Percent
Introduction to PercentSonarin Cruz
 
Probability(mutually exclusive events)
Probability(mutually exclusive events)Probability(mutually exclusive events)
Probability(mutually exclusive events)Nadeem Uddin
 
What is a fraction
What is a fractionWhat is a fraction
What is a fractionolivia73
 
How To Find The Mean
How To Find The MeanHow To Find The Mean
How To Find The MeanTaleese
 
Right triangle similarity
Right triangle similarityRight triangle similarity
Right triangle similaritymonicahonore
 
Lowest terms
Lowest termsLowest terms
Lowest termsjmezzz13
 
Trigonometry - The Six Trigonometric Ratios
Trigonometry - The Six Trigonometric RatiosTrigonometry - The Six Trigonometric Ratios
Trigonometry - The Six Trigonometric RatiosREYBETH RACELIS
 
Counting techniques
Counting techniquesCounting techniques
Counting techniquesChie Pegollo
 
Fractions, decimals, and percentages
Fractions, decimals, and percentagesFractions, decimals, and percentages
Fractions, decimals, and percentagesvantreecka
 

Mais procurados (20)

Parallel Line
Parallel LineParallel Line
Parallel Line
 
Numerical expressions.
Numerical expressions.Numerical expressions.
Numerical expressions.
 
Mental Math Works
Mental Math WorksMental Math Works
Mental Math Works
 
Order Of Operations
Order Of OperationsOrder Of Operations
Order Of Operations
 
Classifying Triangles
Classifying TrianglesClassifying Triangles
Classifying Triangles
 
Similar Figures
Similar FiguresSimilar Figures
Similar Figures
 
Patterns and sequences
Patterns and sequencesPatterns and sequences
Patterns and sequences
 
Patterns and sequences
Patterns and sequencesPatterns and sequences
Patterns and sequences
 
The Interpretation Of Quartiles And Percentiles July 2009
The Interpretation Of Quartiles And Percentiles   July 2009The Interpretation Of Quartiles And Percentiles   July 2009
The Interpretation Of Quartiles And Percentiles July 2009
 
Introduction to Percent
Introduction to PercentIntroduction to Percent
Introduction to Percent
 
Probability(mutually exclusive events)
Probability(mutually exclusive events)Probability(mutually exclusive events)
Probability(mutually exclusive events)
 
Ratio ppt
Ratio pptRatio ppt
Ratio ppt
 
What is a fraction
What is a fractionWhat is a fraction
What is a fraction
 
How To Find The Mean
How To Find The MeanHow To Find The Mean
How To Find The Mean
 
Right triangle similarity
Right triangle similarityRight triangle similarity
Right triangle similarity
 
Decimals
DecimalsDecimals
Decimals
 
Lowest terms
Lowest termsLowest terms
Lowest terms
 
Trigonometry - The Six Trigonometric Ratios
Trigonometry - The Six Trigonometric RatiosTrigonometry - The Six Trigonometric Ratios
Trigonometry - The Six Trigonometric Ratios
 
Counting techniques
Counting techniquesCounting techniques
Counting techniques
 
Fractions, decimals, and percentages
Fractions, decimals, and percentagesFractions, decimals, and percentages
Fractions, decimals, and percentages
 

Semelhante a Cs 1114 - lecture-3

Fundamental Programming Lect 3
Fundamental Programming Lect 3Fundamental Programming Lect 3
Fundamental Programming Lect 3Namrah Erum
 
Cs 1114 - lecture-10
Cs 1114 - lecture-10Cs 1114 - lecture-10
Cs 1114 - lecture-10Zeeshan Sabir
 
Fundamental Programming Lect 4
Fundamental Programming Lect 4Fundamental Programming Lect 4
Fundamental Programming Lect 4Namrah Erum
 
Fundamental Programming Lect 5
Fundamental Programming Lect 5Fundamental Programming Lect 5
Fundamental Programming Lect 5Namrah Erum
 
Covidien Dc Work Keys 101 2
Covidien Dc    Work Keys 101 2Covidien Dc    Work Keys 101 2
Covidien Dc Work Keys 101 2LauraAtACT
 
Std 10 computer chapter 9 Problems and Problem Solving
Std 10 computer chapter 9 Problems and Problem SolvingStd 10 computer chapter 9 Problems and Problem Solving
Std 10 computer chapter 9 Problems and Problem SolvingNuzhat Memon
 
Introduction to Programming
Introduction to ProgrammingIntroduction to Programming
Introduction to ProgrammingALI RAZA
 
Fundamental Programming Lect 2
Fundamental Programming Lect 2Fundamental Programming Lect 2
Fundamental Programming Lect 2Namrah Erum
 
problem solving and design By ZAK
problem solving and design By ZAKproblem solving and design By ZAK
problem solving and design By ZAKTabsheer Hasan
 
How to add and multiply fractions
How to add and multiply fractionsHow to add and multiply fractions
How to add and multiply fractionsbrandi28216
 
ICT_Seminar_flow_charts_for_2013_Nov.pptx
ICT_Seminar_flow_charts_for_2013_Nov.pptxICT_Seminar_flow_charts_for_2013_Nov.pptx
ICT_Seminar_flow_charts_for_2013_Nov.pptxssuser2f67c91
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchartSachin Goyani
 
Saxman Hypermedia
Saxman HypermediaSaxman Hypermedia
Saxman Hypermediasdsaxman
 

Semelhante a Cs 1114 - lecture-3 (20)

Fundamental Programming Lect 3
Fundamental Programming Lect 3Fundamental Programming Lect 3
Fundamental Programming Lect 3
 
Cs 1114 - lecture-10
Cs 1114 - lecture-10Cs 1114 - lecture-10
Cs 1114 - lecture-10
 
Cs 1114 - lecture-4
Cs 1114 - lecture-4Cs 1114 - lecture-4
Cs 1114 - lecture-4
 
Fundamental Programming Lect 4
Fundamental Programming Lect 4Fundamental Programming Lect 4
Fundamental Programming Lect 4
 
Cs 1114 - lecture-5
Cs 1114 - lecture-5Cs 1114 - lecture-5
Cs 1114 - lecture-5
 
Fundamental Programming Lect 5
Fundamental Programming Lect 5Fundamental Programming Lect 5
Fundamental Programming Lect 5
 
Cs 1114 - lecture-2
Cs 1114 - lecture-2Cs 1114 - lecture-2
Cs 1114 - lecture-2
 
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
 
Covidien Dc Work Keys 101 2
Covidien Dc    Work Keys 101 2Covidien Dc    Work Keys 101 2
Covidien Dc Work Keys 101 2
 
Std 10 computer chapter 9 Problems and Problem Solving
Std 10 computer chapter 9 Problems and Problem SolvingStd 10 computer chapter 9 Problems and Problem Solving
Std 10 computer chapter 9 Problems and Problem Solving
 
Cs 1114 - lecture-9
Cs 1114 - lecture-9Cs 1114 - lecture-9
Cs 1114 - lecture-9
 
Introduction to Programming
Introduction to ProgrammingIntroduction to Programming
Introduction to Programming
 
Fundamental Programming Lect 2
Fundamental Programming Lect 2Fundamental Programming Lect 2
Fundamental Programming Lect 2
 
problem solving and design By ZAK
problem solving and design By ZAKproblem solving and design By ZAK
problem solving and design By ZAK
 
How to add and multiply fractions
How to add and multiply fractionsHow to add and multiply fractions
How to add and multiply fractions
 
ICT_Seminar_flow_charts_for_2013_Nov.pptx
ICT_Seminar_flow_charts_for_2013_Nov.pptxICT_Seminar_flow_charts_for_2013_Nov.pptx
ICT_Seminar_flow_charts_for_2013_Nov.pptx
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 
Saxman Hypermedia
Saxman HypermediaSaxman Hypermedia
Saxman Hypermedia
 
CC-112-Lec.1.ppsx
CC-112-Lec.1.ppsxCC-112-Lec.1.ppsx
CC-112-Lec.1.ppsx
 

Último

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
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 Processorsdebabhi2
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
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...apidays
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
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 DevelopmentsTrustArc
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

Cs 1114 - lecture-3

  • 2.
  • 3.
  • 4.
  • 5. Difference of Two numbers Programming Fundamentals | Lecture-3 START READ number1, number2 difference = number1 - number2 DISPLAY difference STOP Will result in a negative value if number1 is smaller than number2
  • 6. Is This Solution Correct? Programming Fundamentals | Lecture-3 START READ number1, number2 difference = number1 - number2 DISPLAY difference STOP difference = difference * -1
  • 7.
  • 8.
  • 9. Should we design two different solutions? Programming Fundamentals | Lecture-1
  • 10.
  • 11. Decision Box Programming Fundamentals | Lecture-3 Decision Rule Yes No Always in the form whose answer is “ Yes” or “No”
  • 12. Programming Fundamentals | Lecture-3 START READ number1, number2 difference = number1 - number2 DISPLAY difference STOP difference = difference * -1 difference < 0 Yes No
  • 13.
  • 14.
  • 15. Programming Fundamentals | Lecture-3 START READ number1, number2 DISPLAY smaller STOP smaller = number1 number1 < number2 Yes No smaller = number2
  • 16. Alternative Programming Fundamentals | Lecture-3 START READ number1, number2 STOP DISPLAY number1 number1 < number2 Yes No DISPLAY number2
  • 17.
  • 18. Output a Message Programming Fundamentals | Lecture-3 DISPLAY “This is a message”
  • 19.
  • 20.
  • 21.
  • 22. Programming Fundamentals | Lecture-2 BE PREPARED FOR QUIZ IN NEXT LECTURE