How to create a python  program that finds the difference between the largest and smallest elements of an array of doubles. Program reads the size of an array of doubles and all its elements. Then program finds the difference between the largest and smallest elements of an array and prints it.       Sample interactive Input/Output       Enter the number of the array elements: 7 Enter the elements of the array of doubles: 3.4  7.1  6.3  12.4  9.3  7.7  5.9 The elements are:  3.4  7.1  6.3  12.4  9.3  7.7  5.9 The difference between the largest and smallest elements is 9.0

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 11PE
icon
Related questions
Question
100%

How to create a python  program that finds the difference between the largest and smallest elements of an array of doubles.

Program reads the size of an array of doubles and all its elements. Then program finds the difference between the largest and smallest elements of an array and prints it.

 

 

 

Sample interactive Input/Output

 

 

 

Enter the number of the array elements: 7

Enter the elements of the array of doubles:

3.4  7.1  6.3  12.4  9.3  7.7  5.9

The elements are:  3.4  7.1  6.3  12.4  9.3  7.7  5.9

The difference between the largest and smallest elements is 9.0

 

Expert Solution
steps

Step by step

Solved in 6 steps with 2 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning