SlideShare a Scribd company logo
1 of 24
Programming Fundamentals
Assignment-1 Solution Programming Fundamentals | Lecture-9 (m == 3 AND d >= 21) OR (m == 4 AND d <= 19) Period Meaning March 21 – April 19 If Month is 3 then Day must be 21 st  or above Or if Month is 4 then Day must be 19 th  or below
Wrong Decision Rules Programming Fundamentals | Lecture-9 m == 3  OR m == 4 m == 4  OR m == 5 DISPLAY “Aries”
Wrong Decision Rules Programming Fundamentals | Lecture-9 (m == 3 AND  d >= 21 AND d <= 31) (m == 4 AND  d >= 20 AND d <= 30)
Less Better Approach Programming Fundamentals | Lecture-9 m == 3 m == 4 Further rules
Lessons from Previous Lecture ,[object Object],[object Object],Programming Fundamentals | Lecture-9
Lessons from Previous Lecture ,[object Object],Programming Fundamentals | Lecture-9 count = count + 1 count < n count = 0 Yes 1 or more steps
Lessons from Previous Lecture ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Programming Fundamentals | Lecture-9
Lessons from Previous Lecture ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Programming Fundamentals | Lecture-9
Another Example ,[object Object],[object Object],[object Object],[object Object],[object Object],Programming Fundamentals | Lecture-9
Sum of first 5 even numbers Programming Fundamentals | Lecture-9 START sum = 0 count = count + 1 STOP count < 5 count = 0 DISPLAY sum Yes No sum = sum + count + count
Alternative Programming Fundamentals | Lecture-9 START sum = 0 count = count + 1 STOP count < 5 count = 0 DISPLAY sum Yes No sum = sum + even even = 0 even = even + 2
Another Example ,[object Object],[object Object],Programming Fundamentals | Lecture-9
Sum of first n odd numbers Programming Fundamentals | Lecture-9 START sum = 0 count = count + 1 STOP count < n count = 0 DISPLAY sum Yes No sum = sum + count + count - 1
Alternative Programming Fundamentals | Lecture-9 START sum = 0 count = count + 1 STOP count < 5 count = 0 DISPLAY sum Yes No sum = sum + odd odd = -1 odd = odd + 2
Consider This ,[object Object],[object Object],[object Object],Programming Fundamentals | Lecture-9
Display first n even numbers Programming Fundamentals | Lecture-9 START count = count + 1 STOP count < 5 count = 0 Yes No DISPLAY even even = 0 even = even + 2
Another Example ,[object Object],[object Object],[object Object],Programming Fundamentals | Lecture-9
Table of a number up to 10 Programming Fundamentals | Lecture-9 START count = count + 1 STOP count < 10 count = 0 Yes No DISPLAY num * count READ num
Another Example ,[object Object],[object Object],Programming Fundamentals | Lecture-9
Programming Fundamentals | Lecture-9 START sum = 0 count = count + 1 STOP count < 5 count = 0 DISPLAY sum Yes No sum = sum + count + 25
Testing Programming Fundamentals | Lecture-9 count = 0 sum = 0 Repetition-1 Repetition-2 Repetition-3 Repetition-4 Repetition-5 decision (count < 5) 0 < 5 1 < 5 2 < 5 3 < 5 4 < 5 count  =  count  + 1 1 = 0 + 1 2 = 1 + 1 3 = 2 + 1 4 = 3 + 1 5 = 4 + 1 sum  =  sum  +  count +25 26 =  0 + (1 + 25)   53 =  26 + (2 + 25) 81 =  53 + (3 + 25) 110 =  81 + (4 + 25) 140 =  110 + (5 + 25)
A Challenging Task ,[object Object],[object Object],Programming Fundamentals | Lecture-9
Programming Fundamentals | Lecture-9 BE PREPARED FOR  QUIZ IN NEXT LECTURE

More Related Content

What's hot

Adding and Subtracting Decimals
Adding and Subtracting DecimalsAdding and Subtracting Decimals
Adding and Subtracting DecimalsJaizaDemecillo
 
Lesson 19
Lesson 19Lesson 19
Lesson 19NRWEG3
 
Lesson 18
Lesson 18Lesson 18
Lesson 18NRWEG3
 
Adding & Subtracting Decimals
Adding & Subtracting DecimalsAdding & Subtracting Decimals
Adding & Subtracting DecimalsRileyAntler
 
Powerpoint on adding and subtracting decimals notes
Powerpoint on adding and subtracting decimals notesPowerpoint on adding and subtracting decimals notes
Powerpoint on adding and subtracting decimals notesLea Perez
 
Answering Techniques Ad Maths P1
Answering Techniques Ad Maths P1Answering Techniques Ad Maths P1
Answering Techniques Ad Maths P1morabisma
 
January 13, 2014
January 13, 2014January 13, 2014
January 13, 2014khyps13
 
Triâng. classif. qto lados aula 77 (21-09)
Triâng. classif. qto lados  aula 77 (21-09)Triâng. classif. qto lados  aula 77 (21-09)
Triâng. classif. qto lados aula 77 (21-09)RosanaRulli
 
8th pre alg -l78
8th pre alg -l788th pre alg -l78
8th pre alg -l78jdurst65
 
Sept. 21, 2012
Sept. 21, 2012Sept. 21, 2012
Sept. 21, 2012khyps13
 
Tic Tac Toe Factoring
Tic Tac Toe FactoringTic Tac Toe Factoring
Tic Tac Toe FactoringDon Simmons
 
7th math c2 -l75
7th math c2 -l757th math c2 -l75
7th math c2 -l75jdurst65
 
Paperhanging Clculations
Paperhanging Clculations Paperhanging Clculations
Paperhanging Clculations michael mcewan
 
Factoring Trinomials
Factoring TrinomialsFactoring Trinomials
Factoring TrinomialsDon Simmons
 
Teoria y problemas de numeros racionales qa84 ccesa007
Teoria y problemas de numeros racionales qa84 ccesa007Teoria y problemas de numeros racionales qa84 ccesa007
Teoria y problemas de numeros racionales qa84 ccesa007Demetrio Ccesa Rayme
 
Area of Irregular Figures
Area of Irregular FiguresArea of Irregular Figures
Area of Irregular Figuresmanswag123
 

What's hot (17)

Adding and Subtracting Decimals
Adding and Subtracting DecimalsAdding and Subtracting Decimals
Adding and Subtracting Decimals
 
Lesson 19
Lesson 19Lesson 19
Lesson 19
 
Lesson 18
Lesson 18Lesson 18
Lesson 18
 
Adding & Subtracting Decimals
Adding & Subtracting DecimalsAdding & Subtracting Decimals
Adding & Subtracting Decimals
 
Powerpoint on adding and subtracting decimals notes
Powerpoint on adding and subtracting decimals notesPowerpoint on adding and subtracting decimals notes
Powerpoint on adding and subtracting decimals notes
 
Answering Techniques Ad Maths P1
Answering Techniques Ad Maths P1Answering Techniques Ad Maths P1
Answering Techniques Ad Maths P1
 
January 13, 2014
January 13, 2014January 13, 2014
January 13, 2014
 
Triâng. classif. qto lados aula 77 (21-09)
Triâng. classif. qto lados  aula 77 (21-09)Triâng. classif. qto lados  aula 77 (21-09)
Triâng. classif. qto lados aula 77 (21-09)
 
8th pre alg -l78
8th pre alg -l788th pre alg -l78
8th pre alg -l78
 
Sept. 21, 2012
Sept. 21, 2012Sept. 21, 2012
Sept. 21, 2012
 
Tic Tac Toe Factoring
Tic Tac Toe FactoringTic Tac Toe Factoring
Tic Tac Toe Factoring
 
Tafe presentation
Tafe presentationTafe presentation
Tafe presentation
 
7th math c2 -l75
7th math c2 -l757th math c2 -l75
7th math c2 -l75
 
Paperhanging Clculations
Paperhanging Clculations Paperhanging Clculations
Paperhanging Clculations
 
Factoring Trinomials
Factoring TrinomialsFactoring Trinomials
Factoring Trinomials
 
Teoria y problemas de numeros racionales qa84 ccesa007
Teoria y problemas de numeros racionales qa84 ccesa007Teoria y problemas de numeros racionales qa84 ccesa007
Teoria y problemas de numeros racionales qa84 ccesa007
 
Area of Irregular Figures
Area of Irregular FiguresArea of Irregular Figures
Area of Irregular Figures
 

Similar to Programming Fundamentals Assignment Solution (m == 3 AND d >= 21) OR (m == 4 AND d <= 19

Cs 1114 - lecture-10
Cs 1114 - lecture-10Cs 1114 - lecture-10
Cs 1114 - lecture-10Zeeshan Sabir
 
Fundamental Programming Lect 3
Fundamental Programming Lect 3Fundamental Programming Lect 3
Fundamental Programming Lect 3Namrah Erum
 
Course project solutions 2019
Course project solutions 2019Course project solutions 2019
Course project solutions 2019Robert Geofroy
 
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
 
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
 
sample ppt.ppt
sample ppt.pptsample ppt.ppt
sample ppt.pptJelmar2
 
Contéo de figuras
Contéo de figurasContéo de figuras
Contéo de figurasJesusBuelna2
 
276939732-P66-M1-B12-E.pdf
276939732-P66-M1-B12-E.pdf276939732-P66-M1-B12-E.pdf
276939732-P66-M1-B12-E.pdfsebastien25
 
15minute-math-integers.ppt
15minute-math-integers.ppt15minute-math-integers.ppt
15minute-math-integers.pptRicardoDeGuzman9
 
Solving Inequalities01
Solving Inequalities01Solving Inequalities01
Solving Inequalities01taco40
 
Saxman Hypermedia
Saxman HypermediaSaxman Hypermedia
Saxman Hypermediasdsaxman
 
6 2solving Inequalities
6 2solving Inequalities6 2solving Inequalities
6 2solving Inequalitiestaco40
 
Algebra Questions.pdf
Algebra Questions.pdfAlgebra Questions.pdf
Algebra Questions.pdfKathryn Patel
 

Similar to Programming Fundamentals Assignment Solution (m == 3 AND d >= 21) OR (m == 4 AND d <= 19 (20)

Cs 1114 - lecture-8
Cs 1114 - lecture-8Cs 1114 - lecture-8
Cs 1114 - lecture-8
 
Cs 1114 - lecture-10
Cs 1114 - lecture-10Cs 1114 - lecture-10
Cs 1114 - lecture-10
 
Fundamental Programming Lect 3
Fundamental Programming Lect 3Fundamental Programming Lect 3
Fundamental Programming Lect 3
 
Cs 1114 - lecture-3
Cs 1114 - lecture-3Cs 1114 - lecture-3
Cs 1114 - lecture-3
 
Course project solutions 2019
Course project solutions 2019Course project solutions 2019
Course project solutions 2019
 
Cs 1114 - lecture-5
Cs 1114 - lecture-5Cs 1114 - lecture-5
Cs 1114 - lecture-5
 
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
 
4. algorithm
4. algorithm4. algorithm
4. algorithm
 
ppt math6 qt3-wk3.pptx
ppt math6 qt3-wk3.pptxppt math6 qt3-wk3.pptx
ppt math6 qt3-wk3.pptx
 
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
 
Cs 1114 - lecture-7
Cs 1114 - lecture-7Cs 1114 - lecture-7
Cs 1114 - lecture-7
 
sample ppt.ppt
sample ppt.pptsample ppt.ppt
sample ppt.ppt
 
Contéo de figuras
Contéo de figurasContéo de figuras
Contéo de figuras
 
276939732-P66-M1-B12-E.pdf
276939732-P66-M1-B12-E.pdf276939732-P66-M1-B12-E.pdf
276939732-P66-M1-B12-E.pdf
 
15minute-math-integers.ppt
15minute-math-integers.ppt15minute-math-integers.ppt
15minute-math-integers.ppt
 
Solving Inequalities01
Solving Inequalities01Solving Inequalities01
Solving Inequalities01
 
Saxman Hypermedia
Saxman HypermediaSaxman Hypermedia
Saxman Hypermedia
 
6 2solving Inequalities
6 2solving Inequalities6 2solving Inequalities
6 2solving Inequalities
 
Algebra Questions.pdf
Algebra Questions.pdfAlgebra Questions.pdf
Algebra Questions.pdf
 
Math%20repurt
Math%20repurtMath%20repurt
Math%20repurt
 

More from Zeeshan Sabir

Cs 1114 - lecture-29
Cs 1114 - lecture-29Cs 1114 - lecture-29
Cs 1114 - lecture-29Zeeshan Sabir
 
Final logic presentation
Final logic presentationFinal logic presentation
Final logic presentationZeeshan Sabir
 
Human resource management process
Human resource management processHuman resource management process
Human resource management processZeeshan Sabir
 

More from Zeeshan Sabir (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-2
Cs 1114 - lecture-2Cs 1114 - lecture-2
Cs 1114 - lecture-2
 
Cs 1114 - lecture-1
Cs 1114 - lecture-1Cs 1114 - lecture-1
Cs 1114 - lecture-1
 
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

The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 

Recently uploaded (20)

The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 

Programming Fundamentals Assignment Solution (m == 3 AND d >= 21) OR (m == 4 AND d <= 19

  • 2. Assignment-1 Solution Programming Fundamentals | Lecture-9 (m == 3 AND d >= 21) OR (m == 4 AND d <= 19) Period Meaning March 21 – April 19 If Month is 3 then Day must be 21 st or above Or if Month is 4 then Day must be 19 th or below
  • 3. Wrong Decision Rules Programming Fundamentals | Lecture-9 m == 3 OR m == 4 m == 4 OR m == 5 DISPLAY “Aries”
  • 4. Wrong Decision Rules Programming Fundamentals | Lecture-9 (m == 3 AND d >= 21 AND d <= 31) (m == 4 AND d >= 20 AND d <= 30)
  • 5. Less Better Approach Programming Fundamentals | Lecture-9 m == 3 m == 4 Further rules
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11. Sum of first 5 even numbers Programming Fundamentals | Lecture-9 START sum = 0 count = count + 1 STOP count < 5 count = 0 DISPLAY sum Yes No sum = sum + count + count
  • 12. Alternative Programming Fundamentals | Lecture-9 START sum = 0 count = count + 1 STOP count < 5 count = 0 DISPLAY sum Yes No sum = sum + even even = 0 even = even + 2
  • 13.
  • 14. Sum of first n odd numbers Programming Fundamentals | Lecture-9 START sum = 0 count = count + 1 STOP count < n count = 0 DISPLAY sum Yes No sum = sum + count + count - 1
  • 15. Alternative Programming Fundamentals | Lecture-9 START sum = 0 count = count + 1 STOP count < 5 count = 0 DISPLAY sum Yes No sum = sum + odd odd = -1 odd = odd + 2
  • 16.
  • 17. Display first n even numbers Programming Fundamentals | Lecture-9 START count = count + 1 STOP count < 5 count = 0 Yes No DISPLAY even even = 0 even = even + 2
  • 18.
  • 19. Table of a number up to 10 Programming Fundamentals | Lecture-9 START count = count + 1 STOP count < 10 count = 0 Yes No DISPLAY num * count READ num
  • 20.
  • 21. Programming Fundamentals | Lecture-9 START sum = 0 count = count + 1 STOP count < 5 count = 0 DISPLAY sum Yes No sum = sum + count + 25
  • 22. Testing Programming Fundamentals | Lecture-9 count = 0 sum = 0 Repetition-1 Repetition-2 Repetition-3 Repetition-4 Repetition-5 decision (count < 5) 0 < 5 1 < 5 2 < 5 3 < 5 4 < 5 count = count + 1 1 = 0 + 1 2 = 1 + 1 3 = 2 + 1 4 = 3 + 1 5 = 4 + 1 sum = sum + count +25 26 = 0 + (1 + 25) 53 = 26 + (2 + 25) 81 = 53 + (3 + 25) 110 = 81 + (4 + 25) 140 = 110 + (5 + 25)
  • 23.
  • 24. Programming Fundamentals | Lecture-9 BE PREPARED FOR QUIZ IN NEXT LECTURE