SlideShare a Scribd company logo
1 of 1
Download to read offline
Write a program that asks a user for two points that are whole numbers as input (assume the user
inputs the correct data, in other words, you do not have to validate this input). Store the first point
in the variables X1 and Y1. Store the second point in X2 and Y2. Create two user-defined
functions. One function should return the midpoint of the line. The second function should return
the slope of the line. Display the returned values to the monitor appropriately labeled midpoint and
slope.

More Related Content

More from spshotham

Let A and B be two events defined on a sample space S of an .pdf
Let A and B be two events defined on a sample space S of an .pdfLet A and B be two events defined on a sample space S of an .pdf
Let A and B be two events defined on a sample space S of an .pdfspshotham
 
Morrison Corporation had the following common stock record d.pdf
Morrison Corporation had the following common stock record d.pdfMorrison Corporation had the following common stock record d.pdf
Morrison Corporation had the following common stock record d.pdfspshotham
 
Copenhagen Covered B Heidi Hi Jensen a foreign exchange.pdf
Copenhagen Covered B Heidi Hi Jensen a foreign exchange.pdfCopenhagen Covered B Heidi Hi Jensen a foreign exchange.pdf
Copenhagen Covered B Heidi Hi Jensen a foreign exchange.pdfspshotham
 
Inmediatamente antes del proceso de liquidacin los socios .pdf
Inmediatamente antes del proceso de liquidacin los socios .pdfInmediatamente antes del proceso de liquidacin los socios .pdf
Inmediatamente antes del proceso de liquidacin los socios .pdfspshotham
 
Feet and Meters Converter Create a program that uses a separ.pdf
Feet and Meters Converter Create a program that uses a separ.pdfFeet and Meters Converter Create a program that uses a separ.pdf
Feet and Meters Converter Create a program that uses a separ.pdfspshotham
 
Assignment Primary endosymbiosis is known to be important in.pdf
Assignment Primary endosymbiosis is known to be important in.pdfAssignment Primary endosymbiosis is known to be important in.pdf
Assignment Primary endosymbiosis is known to be important in.pdfspshotham
 
2 Suppose XBinomial104 and YBinomial204 respective.pdf
2 Suppose XBinomial104 and YBinomial204 respective.pdf2 Suppose XBinomial104 and YBinomial204 respective.pdf
2 Suppose XBinomial104 and YBinomial204 respective.pdfspshotham
 
AequiredPrecart fouthal cmines for 2021 to recind the fr.pdf
AequiredPrecart fouthal cmines for 2021 to recind the fr.pdfAequiredPrecart fouthal cmines for 2021 to recind the fr.pdf
AequiredPrecart fouthal cmines for 2021 to recind the fr.pdfspshotham
 
9 Argument que las personas intentan satisfacer sus neces.pdf
9  Argument que las personas intentan satisfacer sus neces.pdf9  Argument que las personas intentan satisfacer sus neces.pdf
9 Argument que las personas intentan satisfacer sus neces.pdfspshotham
 
3 10 points Given a binary search tree T with a root node.pdf
3 10 points Given a binary search tree T with a root node.pdf3 10 points Given a binary search tree T with a root node.pdf
3 10 points Given a binary search tree T with a root node.pdfspshotham
 
b You are given three events CD and E with probabilities P.pdf
b You are given three events CD and E with probabilities P.pdfb You are given three events CD and E with probabilities P.pdf
b You are given three events CD and E with probabilities P.pdfspshotham
 
The Operating System data is a dataset from a Intro to D.pdf
 The Operating System data is a dataset from a Intro to D.pdf The Operating System data is a dataset from a Intro to D.pdf
The Operating System data is a dataset from a Intro to D.pdfspshotham
 
1Google grntl reklamlar iin aadaki hedefleme yntemle.pdf
1Google grntl reklamlar iin aadaki hedefleme yntemle.pdf1Google grntl reklamlar iin aadaki hedefleme yntemle.pdf
1Google grntl reklamlar iin aadaki hedefleme yntemle.pdfspshotham
 
1817 LAB Playlist output linked list Given main compl.pdf
1817 LAB Playlist output linked list Given main compl.pdf1817 LAB Playlist output linked list Given main compl.pdf
1817 LAB Playlist output linked list Given main compl.pdfspshotham
 

More from spshotham (14)

Let A and B be two events defined on a sample space S of an .pdf
Let A and B be two events defined on a sample space S of an .pdfLet A and B be two events defined on a sample space S of an .pdf
Let A and B be two events defined on a sample space S of an .pdf
 
Morrison Corporation had the following common stock record d.pdf
Morrison Corporation had the following common stock record d.pdfMorrison Corporation had the following common stock record d.pdf
Morrison Corporation had the following common stock record d.pdf
 
Copenhagen Covered B Heidi Hi Jensen a foreign exchange.pdf
Copenhagen Covered B Heidi Hi Jensen a foreign exchange.pdfCopenhagen Covered B Heidi Hi Jensen a foreign exchange.pdf
Copenhagen Covered B Heidi Hi Jensen a foreign exchange.pdf
 
Inmediatamente antes del proceso de liquidacin los socios .pdf
Inmediatamente antes del proceso de liquidacin los socios .pdfInmediatamente antes del proceso de liquidacin los socios .pdf
Inmediatamente antes del proceso de liquidacin los socios .pdf
 
Feet and Meters Converter Create a program that uses a separ.pdf
Feet and Meters Converter Create a program that uses a separ.pdfFeet and Meters Converter Create a program that uses a separ.pdf
Feet and Meters Converter Create a program that uses a separ.pdf
 
Assignment Primary endosymbiosis is known to be important in.pdf
Assignment Primary endosymbiosis is known to be important in.pdfAssignment Primary endosymbiosis is known to be important in.pdf
Assignment Primary endosymbiosis is known to be important in.pdf
 
2 Suppose XBinomial104 and YBinomial204 respective.pdf
2 Suppose XBinomial104 and YBinomial204 respective.pdf2 Suppose XBinomial104 and YBinomial204 respective.pdf
2 Suppose XBinomial104 and YBinomial204 respective.pdf
 
AequiredPrecart fouthal cmines for 2021 to recind the fr.pdf
AequiredPrecart fouthal cmines for 2021 to recind the fr.pdfAequiredPrecart fouthal cmines for 2021 to recind the fr.pdf
AequiredPrecart fouthal cmines for 2021 to recind the fr.pdf
 
9 Argument que las personas intentan satisfacer sus neces.pdf
9  Argument que las personas intentan satisfacer sus neces.pdf9  Argument que las personas intentan satisfacer sus neces.pdf
9 Argument que las personas intentan satisfacer sus neces.pdf
 
3 10 points Given a binary search tree T with a root node.pdf
3 10 points Given a binary search tree T with a root node.pdf3 10 points Given a binary search tree T with a root node.pdf
3 10 points Given a binary search tree T with a root node.pdf
 
b You are given three events CD and E with probabilities P.pdf
b You are given three events CD and E with probabilities P.pdfb You are given three events CD and E with probabilities P.pdf
b You are given three events CD and E with probabilities P.pdf
 
The Operating System data is a dataset from a Intro to D.pdf
 The Operating System data is a dataset from a Intro to D.pdf The Operating System data is a dataset from a Intro to D.pdf
The Operating System data is a dataset from a Intro to D.pdf
 
1Google grntl reklamlar iin aadaki hedefleme yntemle.pdf
1Google grntl reklamlar iin aadaki hedefleme yntemle.pdf1Google grntl reklamlar iin aadaki hedefleme yntemle.pdf
1Google grntl reklamlar iin aadaki hedefleme yntemle.pdf
 
1817 LAB Playlist output linked list Given main compl.pdf
1817 LAB Playlist output linked list Given main compl.pdf1817 LAB Playlist output linked list Given main compl.pdf
1817 LAB Playlist output linked list Given main compl.pdf
 

Recently uploaded

How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17Celine George
 
How to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxHow to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxCeline George
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxLimon Prince
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSean M. Fox
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...Gary Wood
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17Celine George
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaEADTU
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi RajagopalEADTU
 
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhĐề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhleson0603
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...Nguyen Thanh Tu Collection
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project researchCaitlinCummins3
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjMohammed Sikander
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code ExamplesPeter Brusilovsky
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesPooky Knightsmith
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesAmanpreetKaur157993
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxAdelaideRefugio
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSAnaAcapella
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....Ritu480198
 

Recently uploaded (20)

How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17
 
How to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxHow to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptx
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopal
 
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhĐề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical Principles
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategies
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....
 
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
 

Write a program that asks a user for two points that are who.pdf

  • 1. Write a program that asks a user for two points that are whole numbers as input (assume the user inputs the correct data, in other words, you do not have to validate this input). Store the first point in the variables X1 and Y1. Store the second point in X2 and Y2. Create two user-defined functions. One function should return the midpoint of the line. The second function should return the slope of the line. Display the returned values to the monitor appropriately labeled midpoint and slope.