1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
jolli1 [7]
4 years ago
9

Write a program that utilizes a loop to read a set of five floating-point values from user input. Ask the user to enter the valu

es, then print the following data: Total Average Maximum Minimum Interest at 20% for each original value entered by the user. Use the formula: Interest_Value = Original_value + Original_value*0.2
Computers and Technology
1 answer:
rjkz [21]4 years ago
3 0

Answer:

Python code is given below

Explanation:

# create an empty array

arr = []

# loop 5 times

for i in range( 0 , 5 ):

   x = float(input('Enter a number : '))

   # add x to arr

   arr.append( x )

sum = 0

# find the sum of all elements in arr

for x in arr:

   sum += x

# calculate average

average = sum / len(arr)

print('\n%15s %15s\n' %('Original Value' , 'Interest Value'))

for Original_value in arr:

   # calculate interesr value

   Interest_Value = Original_value * 0.2

   print('%10f %15f' %( Original_value , Interest_Value ))

print('\nTotal :', sum)

print('Average :', average)

print('Maximum :', max(arr))

print('Miniimum :', min(arr))

You might be interested in
Need the answer ASAP!!!
Soloha48 [4]

Answer:

creation

Explanation:

i am not sure about this one but u will get a 5 for trying

7 0
3 years ago
Which sentences in the passage correctly describe a function?
quester [9]

Option D is correct.

Explanation :

  1. In option A, it is not mandatory that a function will have arguments and it will return a value.
  2. In option B, no formula begins with =.
  3. In option C, it is not necessary to begin with /.
  4. In option D, MAX function should return maximum value in the set given.

Thus, option D is correct because arguments of a function are always enclosed within parentheses

Example:

SUM (30,70)

8 0
4 years ago
Complete the AscendingAndDescending application so that it asks a user to enter three integers. Display them in ascending and de
Andreas93 [3]

Answer:

Following are the solution to the given question:

import java.util.Scanner;//import package

public class AscendingAndDescending//defining a class AscendingAndDescending  

{

   public static void main(String[] args) //main method

   {

       int n1,n2,n3,min,max,m;

       Scanner in = new Scanner(System.in);//creating Scanner class object

       System.out.print("Enter an integer: ");//print message

       n1 = in.nextInt();//input value

       System.out.print("And another: ");//print message

       n2 = in.nextInt();//input value

       System.out.print("And just one more: ");//print message

       n3 = in.nextInt();//input value

       min = n1; //use min variable that holds value

       max = n1; //use mix variable that holds value

       if (n2 > max) max = n2;//use if to compare value and hols value in max variable

       if (n3 > max) max = n3;//use if to compare value and hols value in max variable

       if (n2 < min) min = n2;//use if to compare value and hols value in min variable

       if (n3 < min) min = n3;//use if to compare value and hols value in min variable

       m = (n1 + n2 + n3) - (min + max);//defining m variable that arrange value

       System.out.println("Ascending: " + min + " " + m + " " + max);//print Ascending order value

       System.out.println("Descending: " + max + " " + m + " " + min);//print Descending order value

   }

}

Output:

Enter an integer: 8

And another: 9

And just one more: 7

Ascending: 7 8 9

Descending: 9 8 7

Explanation:

In this program inside the main method three integer variable "n1,n2, and n3" is declared that inputs value from the user end and also defines three variable "min, max, and m" that uses the conditional statement that checks inputs value and assigns value according to the ascending and descending order and prints its values.

5 0
3 years ago
The Mark Table of Contents Entry option is used for marking nonheading text for the table of contents. the options are manually
enyata [817]

Answer:number 1

Explanation:asian culture

5 0
3 years ago
Read 2 more answers
In memory ads for DIMMs, you notice DDR 2400 CL15 in one ad and PC4 21300 CL9 in another. Which ad is advertising the faster mem
Artyom0805 [142]

Answer:

The answer is 'PC4 21300 CL9".

Explanation:

Faster memory advertising is used to provide customer memory, which is essential for brand actions. It can't be taken throughout ad coverage. Retired-laboratory tests revealed its access to ad-memory detection aspects of the effect of its grade through publicity recovery, that's why it uses the PC4 21300 CL9, it transfers the 170400 bits per second.

8 0
4 years ago
Other questions:
  • he fundamental building block in every Hypertext Markup Language (HTML) document is the _____ tag, which marks a component in th
    7·1 answer
  • Why did Simon bring Michael home?​
    9·2 answers
  • What is the output of the following program?
    10·1 answer
  • What does FLUX do when soldering an electrical joint?
    13·2 answers
  • 100 points please hurry!!!
    14·2 answers
  • Many of the first photographers were actullay scientists and inventors
    11·1 answer
  • discuss the benefits of normalization, and do you think we should normalize our designs to higher levels than 3NF? Why or why no
    9·1 answer
  • Were does igneous rocks cool?
    9·1 answer
  • You would like to narrow your search on this topic.
    15·2 answers
  • Why was the tesla model s help change the was we see EV
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!