SlideShare une entreprise Scribd logo
1  sur  8
Télécharger pour lire hors ligne
Use the structured flowchart below to write a structured Pseudocode. (1 Point)
Start
Declarations
num policyNumber
num age
num dueMonth
num dueDay
num dueYear
num accidents
string lastName
string firstName
input policyNumber, lastName, firstName, age, dueMonth, dueDay, dueYear, accidents
if policyNumber < 1000 OR policyNumber > 9999 then
policyNumber = 0
endif
if dueMonth < 1 OR dueMonth > 12 OR dueDay < 1 OR dueDay > 31 then
dueMonth = 0
dueDay = 0
dueYear = 0
else
if (dueMonth = 2 AND dueDay > 29) OR ((dueMonth = 4 OR dueMonth = 6 OR dueMonth = 9 OR
dueMonth = 11) AND dueDay > 30) then
dueMonth = 0
dueDay = 0
dueYear = 0
else
output policyNumber, lastName, firstName, age, dueMonth, dueDay, dueYear, accidents
endif
endif
stop
Use the structured Pseudocode below to design a structured flowchart. (1 Point)
start
Declarations
num policyNumber
num age
num dueMonth
num dueDay
num dueYear
num accidents
string lastName
string firstName
Input
policyNumber,
lastName,
firstName, age,
dueMonth,
dueDay,
dueYear,
accidents
age > 35?
Output
policyNumber,
lastName,
firstName, age,
dueMonth,
dueDay,
dueYear,
accidents
stop
yes
no
Use the structured flowchart below to write a structured Pseudocode. (1 Point)
Start
Declarations
num policyNumber
num age
num dueMonth
num dueDay
num dueYear
num accidents
string lastName
string firstName
input policyNumber, lastName, firstName, age, dueMonth, dueDay, dueYear, accidents
if dueMonth < 3 OR (dueMonth = 3 AND dueDay <= 15) then
output policyNumber, lastName, firstName, age, dueMonth, dueDay, dueYear, accidents
endif
stop
Use the structured Pseudocode below to design a structured flowchart. (1 Point)
start
Declarations
num policyNumber
num age
num dueMonth
num dueDay
num dueYear
num accidents
string lastName
string firstName
input policyNumber,
lastName, firstName,
age, dueMonth, dueDay,
dueYear, accidents
dueYear < 2011 OR (dueYear =
2011 AND dueDay = 1 AND
dueMonth = 1)?
output policyNumber,
lastname, firstName,
age, dueMonth, dueDa,
dueYear, accidents
stop
yes
no
Use the structured flowchart below to write a structured Pseudocode. (1 Point)
start
Declarations
num idNumber
num dogAge
num dogWeight
num fee
string dogName
string dogBreed
num SMALL_FEE = 55
num MED_FEE = 75
num LARGE_FEE = 105
num XLARGE_FEE = 125
input idNumber, dogName, dogBreed, dogAge, dogWeight
if dogWeight < 15 then
fee = SMALL_FEE
else
if dogWeight <= 30 then
fee = MED_FEE
else
if dogWeight <= 80 then
fee = LARGE_FEE
else
fee = XLARGE_FEE
endif
endif
endif
output idNumber, dogName, dogBreed, dogAge, dogWeight, fee
stop
Use the structured Pseudocode below to design a structured flowchart. (1 Point)
start
Declarations
num orderNum
num deskLength
num deskWidth
num numDrawers
num price
string custName
string woodType
num MIN_FEE= 200
num LARG_FEE = 50
num OAK_FEE = 125
num DRAWER_FEE = 30
input orderNum,
custName, deskLength,
deskWidth,
numDrawers, woodType
eof?
woodType = oak AND
numDrawers >= 1 AND
(deskLength * deskWidth) >
36?
price = MIN_FEE + OAK_FEE
price = price + numDrawers *
DRAWER_FEE
deskLength * deskWidth >
750?
price = price + LARGE_FEE
output orderNum,
custNum, deskLength,
deskWidth,
numDrawers, price,
woodType
stop
input orderNum,
custNum, deskLength,
deskWidth,
numDrawers, woodType
Black Dot Printing is attempting to organize carpools to save energy. Each input record contains an employee s name and town of residence. Ten percent of the
company s employees live in Wonder Lake; 30 percent live in Woodstock. Because these towns are both north of the company, Black Dot wants to encourage employees
who live in either town, to drive to work together. Design a flowchart or pseudocode for following:
A program that accepts an employee s data and displays it with a message that indicates whether the employee is a candidate for the carpool. (2 Points)
start
Declarations
string employeeName
string employeeTown
string message
input employeeName, employeeTown
if employeeTown = Wonder Lake OR (employeeTown = Woodstock ) then
output employeeName, employeeTown, message
endif
stop
Pastoral College is a small college in the Midwest. Design a flowchart or Pseudocode for following:
A program that accepts a student s data: an ID number, first and last name, major field of study, and grade point average. Display a student s data if the student s
grade point average is below 2.0. (2 Points)
start
Declarations
num idNumber
num gpa
string firstName
string lastName
string fieldStudy
input idNumber, gpa, firstName, lastName, fieldStudy
if gpa < 2.0 then
output idNumber, gpa firstName, lastName, fieldStudy
endif
stop

Contenu connexe

Tendances

Properties real numbers basic
Properties real numbers basicProperties real numbers basic
Properties real numbers basic
Bitsy Griffin
 
Day 4 evaluating with add and subtract
Day 4 evaluating with add and subtractDay 4 evaluating with add and subtract
Day 4 evaluating with add and subtract
Erik Tjersland
 
Math tricks for number theory (Revision)
Math tricks for number theory (Revision)Math tricks for number theory (Revision)
Math tricks for number theory (Revision)
Fajri Maulana
 
natural logs - exponential modelling
natural logs - exponential modellingnatural logs - exponential modelling
natural logs - exponential modelling
misz.shaneeey
 
Exploring m and c in the gradient intercept form of a straight line
Exploring m and c in the gradient intercept form of a straight lineExploring m and c in the gradient intercept form of a straight line
Exploring m and c in the gradient intercept form of a straight line
bryan
 
Add and Subtract Deciamls
Add and Subtract DeciamlsAdd and Subtract Deciamls
Add and Subtract Deciamls
vzeto
 

Tendances (20)

Ch01 23
Ch01 23Ch01 23
Ch01 23
 
Multiplying decimals learning ladder
Multiplying decimals learning ladderMultiplying decimals learning ladder
Multiplying decimals learning ladder
 
Max and min trig values
Max and min trig valuesMax and min trig values
Max and min trig values
 
Clock Aptitude Questions and Answers | Clock Aptitude Problem | JobzStore
Clock Aptitude Questions and Answers | Clock Aptitude Problem | JobzStoreClock Aptitude Questions and Answers | Clock Aptitude Problem | JobzStore
Clock Aptitude Questions and Answers | Clock Aptitude Problem | JobzStore
 
Linear Equations - Integer Solutions
Linear Equations - Integer SolutionsLinear Equations - Integer Solutions
Linear Equations - Integer Solutions
 
Per6 basis_Representations Of Integers
Per6 basis_Representations Of IntegersPer6 basis_Representations Of Integers
Per6 basis_Representations Of Integers
 
Inequalities - Integer solutions
Inequalities - Integer solutionsInequalities - Integer solutions
Inequalities - Integer solutions
 
Standardform
StandardformStandardform
Standardform
 
TDM - Tesla Dove Mathematics
TDM - Tesla Dove MathematicsTDM - Tesla Dove Mathematics
TDM - Tesla Dove Mathematics
 
Computer programming
Computer programmingComputer programming
Computer programming
 
Properties real numbers basic
Properties real numbers basicProperties real numbers basic
Properties real numbers basic
 
023 lesson 14
023 lesson 14023 lesson 14
023 lesson 14
 
Algebra opt
Algebra optAlgebra opt
Algebra opt
 
5. Error Coding
5. Error Coding5. Error Coding
5. Error Coding
 
Day 4 evaluating with add and subtract
Day 4 evaluating with add and subtractDay 4 evaluating with add and subtract
Day 4 evaluating with add and subtract
 
Math tricks for number theory (Revision)
Math tricks for number theory (Revision)Math tricks for number theory (Revision)
Math tricks for number theory (Revision)
 
natural logs - exponential modelling
natural logs - exponential modellingnatural logs - exponential modelling
natural logs - exponential modelling
 
Exploring m and c in the gradient intercept form of a straight line
Exploring m and c in the gradient intercept form of a straight lineExploring m and c in the gradient intercept form of a straight line
Exploring m and c in the gradient intercept form of a straight line
 
001 pedagogy test math
001 pedagogy test  math001 pedagogy test  math
001 pedagogy test math
 
Add and Subtract Deciamls
Add and Subtract DeciamlsAdd and Subtract Deciamls
Add and Subtract Deciamls
 

Similaire à Project 3 - Intro to Programming Logic

Insurance Optimization
Insurance OptimizationInsurance Optimization
Insurance Optimization
Albert Chu
 
Sample Program file class 11.pdf
Sample Program file class 11.pdfSample Program file class 11.pdf
Sample Program file class 11.pdf
YashMirge2
 
OverviewThis hands-on lab allows you to follow and experiment w.docx
OverviewThis hands-on lab allows you to follow and experiment w.docxOverviewThis hands-on lab allows you to follow and experiment w.docx
OverviewThis hands-on lab allows you to follow and experiment w.docx
gerardkortney
 
error 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docx
error 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docxerror 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docx
error 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docx
SALU18
 
INSTRUCTIONS Please organize your answers as a Word document with.docx
INSTRUCTIONS Please organize your answers as a Word document with.docxINSTRUCTIONS Please organize your answers as a Word document with.docx
INSTRUCTIONS Please organize your answers as a Word document with.docx
dirkrplav
 
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
ssuser2f67c91
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1
rajnidhiman
 
presentation_python_11_1569171345_375360.pptx
presentation_python_11_1569171345_375360.pptxpresentation_python_11_1569171345_375360.pptx
presentation_python_11_1569171345_375360.pptx
GAURAVRATHORE86
 

Similaire à Project 3 - Intro to Programming Logic (20)

Insurance Optimization
Insurance OptimizationInsurance Optimization
Insurance Optimization
 
Sample Program file class 11.pdf
Sample Program file class 11.pdfSample Program file class 11.pdf
Sample Program file class 11.pdf
 
An Interactive Introduction To R (Programming Language For Statistics)
An Interactive Introduction To R (Programming Language For Statistics)An Interactive Introduction To R (Programming Language For Statistics)
An Interactive Introduction To R (Programming Language For Statistics)
 
OverviewThis hands-on lab allows you to follow and experiment w.docx
OverviewThis hands-on lab allows you to follow and experiment w.docxOverviewThis hands-on lab allows you to follow and experiment w.docx
OverviewThis hands-on lab allows you to follow and experiment w.docx
 
error 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docx
error 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docxerror 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docx
error 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docx
 
Cs291 assignment solution
Cs291 assignment solutionCs291 assignment solution
Cs291 assignment solution
 
Data Science and Machine Learning Using Python and Scikit-learn
Data Science and Machine Learning Using Python and Scikit-learnData Science and Machine Learning Using Python and Scikit-learn
Data Science and Machine Learning Using Python and Scikit-learn
 
Regression and Classification with R
Regression and Classification with RRegression and Classification with R
Regression and Classification with R
 
C faq pdf
C faq pdfC faq pdf
C faq pdf
 
INSTRUCTIONS Please organize your answers as a Word document with.docx
INSTRUCTIONS Please organize your answers as a Word document with.docxINSTRUCTIONS Please organize your answers as a Word document with.docx
INSTRUCTIONS Please organize your answers as a Word document with.docx
 
Course project solutions 2019
Course project solutions 2019Course project solutions 2019
Course project solutions 2019
 
A few solvers for portfolio selection
A few solvers for portfolio selectionA few solvers for portfolio selection
A few solvers for portfolio selection
 
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
 
Informatics Practices (new) solution CBSE 2021, Compartment, improvement ex...
Informatics Practices (new) solution CBSE  2021, Compartment,  improvement ex...Informatics Practices (new) solution CBSE  2021, Compartment,  improvement ex...
Informatics Practices (new) solution CBSE 2021, Compartment, improvement ex...
 
Csci101 lect03 algorithms_i
Csci101 lect03 algorithms_iCsci101 lect03 algorithms_i
Csci101 lect03 algorithms_i
 
C Programming Lab.pdf
C Programming Lab.pdfC Programming Lab.pdf
C Programming Lab.pdf
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1
 
presentation_python_11_1569171345_375360.pptx
presentation_python_11_1569171345_375360.pptxpresentation_python_11_1569171345_375360.pptx
presentation_python_11_1569171345_375360.pptx
 
Database Management System - SQL Advanced Training
Database Management System - SQL Advanced TrainingDatabase Management System - SQL Advanced Training
Database Management System - SQL Advanced Training
 

Dernier

Dernier (20)

CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
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
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
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
 
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
 
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
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
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...
 
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
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
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...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

Project 3 - Intro to Programming Logic

  • 1. Use the structured flowchart below to write a structured Pseudocode. (1 Point) Start Declarations num policyNumber num age num dueMonth num dueDay num dueYear num accidents string lastName string firstName input policyNumber, lastName, firstName, age, dueMonth, dueDay, dueYear, accidents if policyNumber < 1000 OR policyNumber > 9999 then policyNumber = 0 endif if dueMonth < 1 OR dueMonth > 12 OR dueDay < 1 OR dueDay > 31 then dueMonth = 0 dueDay = 0 dueYear = 0 else if (dueMonth = 2 AND dueDay > 29) OR ((dueMonth = 4 OR dueMonth = 6 OR dueMonth = 9 OR dueMonth = 11) AND dueDay > 30) then dueMonth = 0 dueDay = 0 dueYear = 0 else output policyNumber, lastName, firstName, age, dueMonth, dueDay, dueYear, accidents endif endif stop
  • 2. Use the structured Pseudocode below to design a structured flowchart. (1 Point) start Declarations num policyNumber num age num dueMonth num dueDay num dueYear num accidents string lastName string firstName Input policyNumber, lastName, firstName, age, dueMonth, dueDay, dueYear, accidents age > 35? Output policyNumber, lastName, firstName, age, dueMonth, dueDay, dueYear, accidents stop yes no
  • 3. Use the structured flowchart below to write a structured Pseudocode. (1 Point) Start Declarations num policyNumber num age num dueMonth num dueDay num dueYear num accidents string lastName string firstName input policyNumber, lastName, firstName, age, dueMonth, dueDay, dueYear, accidents if dueMonth < 3 OR (dueMonth = 3 AND dueDay <= 15) then output policyNumber, lastName, firstName, age, dueMonth, dueDay, dueYear, accidents endif stop
  • 4. Use the structured Pseudocode below to design a structured flowchart. (1 Point) start Declarations num policyNumber num age num dueMonth num dueDay num dueYear num accidents string lastName string firstName input policyNumber, lastName, firstName, age, dueMonth, dueDay, dueYear, accidents dueYear < 2011 OR (dueYear = 2011 AND dueDay = 1 AND dueMonth = 1)? output policyNumber, lastname, firstName, age, dueMonth, dueDa, dueYear, accidents stop yes no
  • 5. Use the structured flowchart below to write a structured Pseudocode. (1 Point) start Declarations num idNumber num dogAge num dogWeight num fee string dogName string dogBreed num SMALL_FEE = 55 num MED_FEE = 75 num LARGE_FEE = 105 num XLARGE_FEE = 125 input idNumber, dogName, dogBreed, dogAge, dogWeight if dogWeight < 15 then fee = SMALL_FEE else if dogWeight <= 30 then fee = MED_FEE else if dogWeight <= 80 then fee = LARGE_FEE else fee = XLARGE_FEE endif endif endif output idNumber, dogName, dogBreed, dogAge, dogWeight, fee stop
  • 6. Use the structured Pseudocode below to design a structured flowchart. (1 Point) start Declarations num orderNum num deskLength num deskWidth num numDrawers num price string custName string woodType num MIN_FEE= 200 num LARG_FEE = 50 num OAK_FEE = 125 num DRAWER_FEE = 30 input orderNum, custName, deskLength, deskWidth, numDrawers, woodType eof? woodType = oak AND numDrawers >= 1 AND (deskLength * deskWidth) > 36? price = MIN_FEE + OAK_FEE price = price + numDrawers * DRAWER_FEE deskLength * deskWidth > 750? price = price + LARGE_FEE output orderNum, custNum, deskLength, deskWidth, numDrawers, price, woodType stop input orderNum, custNum, deskLength, deskWidth, numDrawers, woodType
  • 7. Black Dot Printing is attempting to organize carpools to save energy. Each input record contains an employee s name and town of residence. Ten percent of the company s employees live in Wonder Lake; 30 percent live in Woodstock. Because these towns are both north of the company, Black Dot wants to encourage employees who live in either town, to drive to work together. Design a flowchart or pseudocode for following: A program that accepts an employee s data and displays it with a message that indicates whether the employee is a candidate for the carpool. (2 Points) start Declarations string employeeName string employeeTown string message input employeeName, employeeTown if employeeTown = Wonder Lake OR (employeeTown = Woodstock ) then output employeeName, employeeTown, message endif stop
  • 8. Pastoral College is a small college in the Midwest. Design a flowchart or Pseudocode for following: A program that accepts a student s data: an ID number, first and last name, major field of study, and grade point average. Display a student s data if the student s grade point average is below 2.0. (2 Points) start Declarations num idNumber num gpa string firstName string lastName string fieldStudy input idNumber, gpa, firstName, lastName, fieldStudy if gpa < 2.0 then output idNumber, gpa firstName, lastName, fieldStudy endif stop