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
saw5 [17]
3 years ago
15

Write. A program to fine the difference of two number 25 and 17 . Also displays the output

Computers and Technology
1 answer:
Anon25 [30]3 years ago
6 0

Answer:

Answer = 25-17

print("25-17", Answer)

Explanation:

You put the sum into a variable which in this case would be Answer and then you can output it with the question.

You might be interested in
The program that is BEST suited
Troyanec [42]

Answer:

everything

Explanation:

cuz I use everything and they all work good

6 0
3 years ago
Write a program that prompts the user to enter five test scores and then prints the average test score. Indicate the average tes
eduard

Answer:

I am writing the program in C++ and Python.

C++ code:

#include <iostream>  // for input output functions

using namespace std;   // identifies objects like cin cout

int main() //start of main() function body

{  //  test scores variables are declared along with average and sum variables

 double test_score1, test_score2, test_score3, test_score4, test_score5, average, sum;      

   cout << "Enter 5 test scores: \n";  //prompts user to enter 5 test scores

   cin >> test_score1 >> test_score2 >> test_score3 >> test_score4 >> test_score5;  //reads values of five test scores entered by user

   sum = test_score1 + test_score2 + test_score3 + test_score4 + test_score5;  // calculates the sum of the five test scores

   average = sum / 5;      //computes the average of five test scores

   cout << "The average test score is: " << average;  

 //displays the computer average of the five test scores entered by the user

}

Explanation:

The program prompts the user to enter the values of 5 test scores. It the calculates the sum of all these 5 input test scores and stores the result in sum variable. In order to compute average test score the sum of these 5 test scores is divided by the total number of test scores that is 5 and the result is stored in average variable. Lastly it displays the average by displaying the value of the average stored in the average variable.

Python Program:

num=5  # total number of test scores

list=[]  #list to store values of 5 test scores

for i in range(0,num):  #loop to enter values of test scores

#prompts user to enter values for 5 test scores

   test_scores =int(input("Enter the five test scores"))

   list.append(test_scores)  #appends the input test scores in the list

average=sum(list)/num  #calculates sum of the values stored in list and #divides the value of sum with the total number of test scores i.e. 5

print("Average test score is: ",round(average,2))

#displays average of the five test scores rounding up to two decimal places

Explanation:

This is a small program in Python to compute average test score. If you want to take separate input for each of the five test scores you can use the following program:

#takes value for each test score seperately from user

testScore1 = int(input('Enter 1st test score: '))  

testScore2 = int(input('Enter 2nd test score : '))

testScore3 = int(input('Enter 3rd test score : '))

testScore4 = int(input('Enter 4th test score : '))

testScore5 = int(input('Enter 5th test score : '))  

#calculates sum of each test score

sum = (testScore1 + testScore2 + testScore3 + testScore4 + testScore5)  

#method to compute average test score

def average(sum):

   return sum / 5         #divide value of sum with total number of test scores  

#calls average function to display average test score using print statement

print("average test score is: " , average(sum))

The programs along with their outputs is attached in the screenshots.

5 0
3 years ago
What is the term for the era created by the digital revolution?
Ahat [919]
Technological innovation
8 0
3 years ago
Use three or more sentences to explain to someone why they might need to use a virtual machine.
Rudik [331]

Answer:

Benefits of Virtualization

Reduced capital and operating costs.

Minimized or eliminated downtime.

Increased IT productivity, efficiency, agility and responsiveness.

Faster provisioning of applications and resources.

Greater business continuity and disaster recovery.

Simplified data center management.

6 0
3 years ago
Which file system is designed to verify and autocorrect data faults on the volume without having to bring the volume down for ma
Aloiza [94]

Answer: ReFS or Resilient File System.

The ReFS system was actually built from the NTFS (New Technology File System). The ReFS has similar features, but also comes with a built-in scanning system. The ReFS constantly checks your data constantly for corrupted data. The ReFS also supports larger volumes of drives and can support up to 32,768 characters.

6 0
3 years ago
Other questions:
  • The equation y=2x+1 represents a function true or false
    11·1 answer
  • Tom is required to present the activities of his Nature club each month to the school committee. Which presentation element can
    12·2 answers
  • If a computer is found to have an ip address of 169.254.1.1, what can you assume about how it received that ip address?
    11·1 answer
  • Whats the difference between firms that provide services and firms that sell products?
    7·2 answers
  • What are the advantages of using an external style sheet?
    9·1 answer
  • In what way was the Ohio River Valley a factor in the French and Indian War? The Ohio River Valley was controlled by both France
    8·2 answers
  • A drug like cocaine cause more dopamine to be produce in the brain
    15·2 answers
  • ____ refers to the order in which values are used with operators.
    9·1 answer
  • Large computer programs, such as operating systems, achieve zero defects prior to release. Group of answer choices True False Pr
    7·1 answer
  • What are the advantages of Database management system (DBMS)??<br>At least mention six of them​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!