SlideShare a Scribd company logo
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 ssuser8308881

Which of the following statements is not correct about the population.pdf
 Which of the following statements is not correct about the population.pdf Which of the following statements is not correct about the population.pdf
Which of the following statements is not correct about the population.pdf
ssuser8308881
 
Which of the following statements are true for the TCPIP context. a..pdf
 Which of the following statements are true for the TCPIP context. a..pdf Which of the following statements are true for the TCPIP context. a..pdf
Which of the following statements are true for the TCPIP context. a..pdf
ssuser8308881
 
Which of the following statements about merit goods is correct Emerg.pdf
 Which of the following statements about merit goods is correct Emerg.pdf Which of the following statements about merit goods is correct Emerg.pdf
Which of the following statements about merit goods is correct Emerg.pdf
ssuser8308881
 
Which of the following statement(s) isare NOT true regarding mon.pdf
 Which of the following statement(s) isare NOT true regarding mon.pdf Which of the following statement(s) isare NOT true regarding mon.pdf
Which of the following statement(s) isare NOT true regarding mon.pdf
ssuser8308881
 
Which of the following statements about arthropods is false Terrestr.pdf
 Which of the following statements about arthropods is false Terrestr.pdf Which of the following statements about arthropods is false Terrestr.pdf
Which of the following statements about arthropods is false Terrestr.pdf
ssuser8308881
 
Which of the following pieces of audit evidence would most likely be .pdf
 Which of the following pieces of audit evidence would most likely be .pdf Which of the following pieces of audit evidence would most likely be .pdf
Which of the following pieces of audit evidence would most likely be .pdf
ssuser8308881
 
Which of the following phrases does not describe a function of the pr.pdf
 Which of the following phrases does not describe a function of the pr.pdf Which of the following phrases does not describe a function of the pr.pdf
Which of the following phrases does not describe a function of the pr.pdf
ssuser8308881
 
Which of the following is true of the liability of a common carrier o.pdf
 Which of the following is true of the liability of a common carrier o.pdf Which of the following is true of the liability of a common carrier o.pdf
Which of the following is true of the liability of a common carrier o.pdf
ssuser8308881
 
Which of the following is true of FST, a measure of genetic distanc.pdf
 Which of the following is true of FST, a measure of genetic distanc.pdf Which of the following is true of FST, a measure of genetic distanc.pdf
Which of the following is true of FST, a measure of genetic distanc.pdf
ssuser8308881
 
Which of the following is TRUE about bank runs FDIC insurance makes .pdf
 Which of the following is TRUE about bank runs FDIC insurance makes .pdf Which of the following is TRUE about bank runs FDIC insurance makes .pdf
Which of the following is TRUE about bank runs FDIC insurance makes .pdf
ssuser8308881
 
Which of the following is the correct sequence in the development of .pdf
 Which of the following is the correct sequence in the development of .pdf Which of the following is the correct sequence in the development of .pdf
Which of the following is the correct sequence in the development of .pdf
ssuser8308881
 
Which of the following is the first valueadding step of information s.pdf
 Which of the following is the first valueadding step of information s.pdf Which of the following is the first valueadding step of information s.pdf
Which of the following is the first valueadding step of information s.pdf
ssuser8308881
 
Which of the following is not true about properly functioning onsite .pdf
 Which of the following is not true about properly functioning onsite .pdf Which of the following is not true about properly functioning onsite .pdf
Which of the following is not true about properly functioning onsite .pdf
ssuser8308881
 
Which of the following is not a way to encourage innovation Support .pdf
 Which of the following is not a way to encourage innovation Support .pdf Which of the following is not a way to encourage innovation Support .pdf
Which of the following is not a way to encourage innovation Support .pdf
ssuser8308881
 
Which of the following is not a cost of sexual reproduction a) O.pdf
 Which of the following is not a cost of sexual reproduction a) O.pdf Which of the following is not a cost of sexual reproduction a) O.pdf
Which of the following is not a cost of sexual reproduction a) O.pdf
ssuser8308881
 
Which of the following is most likely to happen when one party intent.pdf
 Which of the following is most likely to happen when one party intent.pdf Which of the following is most likely to happen when one party intent.pdf
Which of the following is most likely to happen when one party intent.pdf
ssuser8308881
 
Which of the following is correct Question 45 attachment Answers A -.pdf
 Which of the following is correct Question 45 attachment Answers A -.pdf Which of the following is correct Question 45 attachment Answers A -.pdf
Which of the following is correct Question 45 attachment Answers A -.pdf
ssuser8308881
 
Which of the following functions isare implemented in the Network .pdf
 Which of the following functions isare implemented in the Network .pdf Which of the following functions isare implemented in the Network .pdf
Which of the following functions isare implemented in the Network .pdf
ssuser8308881
 
Which of the following is anterior to the vocal folds A. arytenoid c.pdf
 Which of the following is anterior to the vocal folds A. arytenoid c.pdf Which of the following is anterior to the vocal folds A. arytenoid c.pdf
Which of the following is anterior to the vocal folds A. arytenoid c.pdf
ssuser8308881
 
Which of the following diseases is correctly matched with the way in .pdf
 Which of the following diseases is correctly matched with the way in .pdf Which of the following diseases is correctly matched with the way in .pdf
Which of the following diseases is correctly matched with the way in .pdf
ssuser8308881
 

More from ssuser8308881 (20)

Which of the following statements is not correct about the population.pdf
 Which of the following statements is not correct about the population.pdf Which of the following statements is not correct about the population.pdf
Which of the following statements is not correct about the population.pdf
 
Which of the following statements are true for the TCPIP context. a..pdf
 Which of the following statements are true for the TCPIP context. a..pdf Which of the following statements are true for the TCPIP context. a..pdf
Which of the following statements are true for the TCPIP context. a..pdf
 
Which of the following statements about merit goods is correct Emerg.pdf
 Which of the following statements about merit goods is correct Emerg.pdf Which of the following statements about merit goods is correct Emerg.pdf
Which of the following statements about merit goods is correct Emerg.pdf
 
Which of the following statement(s) isare NOT true regarding mon.pdf
 Which of the following statement(s) isare NOT true regarding mon.pdf Which of the following statement(s) isare NOT true regarding mon.pdf
Which of the following statement(s) isare NOT true regarding mon.pdf
 
Which of the following statements about arthropods is false Terrestr.pdf
 Which of the following statements about arthropods is false Terrestr.pdf Which of the following statements about arthropods is false Terrestr.pdf
Which of the following statements about arthropods is false Terrestr.pdf
 
Which of the following pieces of audit evidence would most likely be .pdf
 Which of the following pieces of audit evidence would most likely be .pdf Which of the following pieces of audit evidence would most likely be .pdf
Which of the following pieces of audit evidence would most likely be .pdf
 
Which of the following phrases does not describe a function of the pr.pdf
 Which of the following phrases does not describe a function of the pr.pdf Which of the following phrases does not describe a function of the pr.pdf
Which of the following phrases does not describe a function of the pr.pdf
 
Which of the following is true of the liability of a common carrier o.pdf
 Which of the following is true of the liability of a common carrier o.pdf Which of the following is true of the liability of a common carrier o.pdf
Which of the following is true of the liability of a common carrier o.pdf
 
Which of the following is true of FST, a measure of genetic distanc.pdf
 Which of the following is true of FST, a measure of genetic distanc.pdf Which of the following is true of FST, a measure of genetic distanc.pdf
Which of the following is true of FST, a measure of genetic distanc.pdf
 
Which of the following is TRUE about bank runs FDIC insurance makes .pdf
 Which of the following is TRUE about bank runs FDIC insurance makes .pdf Which of the following is TRUE about bank runs FDIC insurance makes .pdf
Which of the following is TRUE about bank runs FDIC insurance makes .pdf
 
Which of the following is the correct sequence in the development of .pdf
 Which of the following is the correct sequence in the development of .pdf Which of the following is the correct sequence in the development of .pdf
Which of the following is the correct sequence in the development of .pdf
 
Which of the following is the first valueadding step of information s.pdf
 Which of the following is the first valueadding step of information s.pdf Which of the following is the first valueadding step of information s.pdf
Which of the following is the first valueadding step of information s.pdf
 
Which of the following is not true about properly functioning onsite .pdf
 Which of the following is not true about properly functioning onsite .pdf Which of the following is not true about properly functioning onsite .pdf
Which of the following is not true about properly functioning onsite .pdf
 
Which of the following is not a way to encourage innovation Support .pdf
 Which of the following is not a way to encourage innovation Support .pdf Which of the following is not a way to encourage innovation Support .pdf
Which of the following is not a way to encourage innovation Support .pdf
 
Which of the following is not a cost of sexual reproduction a) O.pdf
 Which of the following is not a cost of sexual reproduction a) O.pdf Which of the following is not a cost of sexual reproduction a) O.pdf
Which of the following is not a cost of sexual reproduction a) O.pdf
 
Which of the following is most likely to happen when one party intent.pdf
 Which of the following is most likely to happen when one party intent.pdf Which of the following is most likely to happen when one party intent.pdf
Which of the following is most likely to happen when one party intent.pdf
 
Which of the following is correct Question 45 attachment Answers A -.pdf
 Which of the following is correct Question 45 attachment Answers A -.pdf Which of the following is correct Question 45 attachment Answers A -.pdf
Which of the following is correct Question 45 attachment Answers A -.pdf
 
Which of the following functions isare implemented in the Network .pdf
 Which of the following functions isare implemented in the Network .pdf Which of the following functions isare implemented in the Network .pdf
Which of the following functions isare implemented in the Network .pdf
 
Which of the following is anterior to the vocal folds A. arytenoid c.pdf
 Which of the following is anterior to the vocal folds A. arytenoid c.pdf Which of the following is anterior to the vocal folds A. arytenoid c.pdf
Which of the following is anterior to the vocal folds A. arytenoid c.pdf
 
Which of the following diseases is correctly matched with the way in .pdf
 Which of the following diseases is correctly matched with the way in .pdf Which of the following diseases is correctly matched with the way in .pdf
Which of the following diseases is correctly matched with the way in .pdf
 

Recently uploaded

Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
สมใจ จันสุกสี
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
S. Raj Kumar
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
EduSkills OECD
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 

Recently uploaded (20)

Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 

Write a program that asks a user for two points that are whole number.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.