write a python program to calculate the average of the given number​

Answers

Answer 1

Answer:

The program in Python is as follows:

n = int(input())

sum = 0

for i in range(n):

   num= float(input())

   sum+=num

   

print("Average: ",sum/n)

Explanation:

Required

Average of numbers

The explanation is as follows:

This prompts the user for the count of numbers, n

n = int(input())

Initialize sum to 0

sum = 0

Iterate through n

for i in range(n):

This gets input for each number

   num= float(input())

This calculates the sum of all inputs

   sum+=num

This calculates and prints the average of all inputs

print("Average: ",sum/n)


Related Questions

Can you help me in this question

Answers

Answer:

count = arry[0];

          for (i = 0; i < n; i++)

          {

              if (count>5);

              {

                  count;

              }

          }

       

       cout << "Total Count of the numbers greater than or equal to 5 : " <<count ;

Explanation:

count = arry[0];

          for (i = 0; i < n; i++)

          {

              if (count>5);

              {

                  count;

              }

          }

       

       cout << "Total Count of the numbers greater than or equal to 5 : " <<count ;

You are configuring NIC teaming on a server with two network adapters. You chose Switch Independent Mode. You now must choose between the two modes determining if one adapter is left offline or both adapters are functional. You require a mode for the highest throughput. What mode do you choose?

Answers

Answer:

The appropriate answer is "Active/Active mode".

Explanation:

Now just after the customers or clients respond to the traditional standards, the board is comprised the information rapport with the cloud service, which would be considered as Active mode.The car glides primarily somewhere at a specified constantly controlled rate of the conductor. Currently entering the grounding connection boosts the flow of electrons further into the receiver as well as the transmitter.

Thus the above is the correct solution.

Number are stored and transmitted inside a computer in the form of​

Answers

Number are stored and transmitted inside a computer in the form of ASCII code

What is the primary difference between BMPs, JPEGs, and GIFs?

Answers

In simple words,
JPEGs- Images
GIFs- animated images used for messaging

In the properly way to explain,
BMPs- The BMP file format, also known as bitmap image file, device independent bitmap (DIB) file format and bitmap, is a raster graphics image file format used to store bitmap digital images, independently of the display device (such as a graphics adapter), especially on Microsoft Windows and OS/2 operating systems.

Answer:

BMPs are not compressed; JPEGs and GIFs are compressedExplanation:

What is the page table mainly for?

Answers

Answer: See explanation

Explanation:

A page table is used for the tracking and the location of different pages of a task in memory. It helps in showing the mapping of locations between the physical addresses and the virtual addresses.

A page table stores also has the page table entries and this is where the frame numbers are stored as well as the operational status.

what is SEO and SEM?

Answers

Answer:

SEO stands for “search engine optimization.” In simple terms, it means the process of improving your site to increase its visibility for relevant searches.

SEM, or search engine marketing, is the act of using paid strategies to increase search visibility.

What is the IP address and TCP port number used by the client computer (source) that is transferring the file to gaia.cs.umass.edu

Answers

Answer:

Explanation:

ae

At one college, the tuition for a full-time student is $6,000 per semester. It has been announced that the tuition will increase by 2 percent each year for the next five years. Design a program with a loop that displays the projected semester tuition amount for the next five years.

Answers

Answer:grhgrt

Explanation:

The program is an illustration of loops;

Loops are program statements used to perform repetition

The tuition program

The program written in Python, where comments are used to explain each action is as follows:

#This initializes the fee

fee = 6000

#The following loop is repeated 5 times

for i in range(5):

   #This calculates the fee, each year

   fee *= 1.02

   #This prints the calculated fee

   print(round(fee,2),end=" ")

Read more about loops at:

https://brainly.com/question/24833629

#SPJ6

Explain the steps that are needed to remove the data items from linked list

Answers

Explanation:

Iterative Method:

To delete a node from the linked list, we need to do the following steps.

1) Find the previous node of the node to be deleted.

2) Change the next of the previous node.

3) Free memory for the node to be deleted.

Scenario: The Development group in a company wants to setup theirown Child Domain to have full control on managing their accounts and policies. The Main IT group is recommending they are setup with an Organizational Unit, and delegating the appropriate access.Make your case supporting either the Development group or the Main IT group.Computer ScienceEngineering & TechnologyNetworkingIFT 220

Answers

Answer:

(:

Explanation:

The Self-Quiz gives you an opportunity to self-assess your knowledge of what you have learned so far.

a. True
b. False

Answers

Answer:

a. True

Explanation:

A test can be defined as an examination or quiz given to a student (pupil) during an academic calendar in order to measure or determine his or her intelligence. It is usually graded based on a set of defined grades or scores.

The key characteristics of a well-designed test includes the following;

I. Standardization: it is important that test is set based on certain criteria and acceptable rules within the education community and curriculum.

II. Reliability: the questions contained in a test should be credible and backed by correct answers.

III. Validity: the test questions should be genuine and authentic across board.

Basically, a Self-Quiz is a form of test which is aimed at assessing or measuring the knowledge of a self quiz taker (user) such as a student or pupil.

This ultimately implies that, Self-Quiz avail an end users the opportunity to self-assess his or her knowledge of what he or she might have learned over a specific period of time.

However, any result or score obtained through a Self-Quiz count for nothing with respect to final grade or gaining admission into the university.

A ___________ consists of a large number of network servers used for the storage, processing, management, distribution, and archiving of data, systems, web traffic, services, and enterprise applications.

Answers

Answer:

Data center

Explanation:

A network service provider can be defined as a business firm or company that is saddled with the responsibility of leasing or selling bandwidth, internet services, infrastructure such as cable lines to both large and small internet service providers.

Generally, all network service providers, internet service providers and most business organizations have a dedicated building or space which comprises of a large number of computer systems, security devices, network servers, switches, routers, storage systems, firewalls, and other network associated devices (components) typically used for remote storage, processing, management, distribution, and archiving of large amount of data, systems, web traffic, services, and enterprise applications.

Furthermore, there are four (4) main types of data center and these includes;

I. Managed services data centers.

II. Cloud data centers.

III. Colocation data centers.

IV. Enterprise data centers.

Write an application that prompts a user for two integers and displays every integer between them. Display There are no integers between X and Y if there are no integers between the entered values. Make sure the program works regardless of which entered value is larger.

Answers

Answer:

x = int(input("Enter an integer: "))

y = int(input("Enter another integer: "))

if x > y:

   for number in range(y+1, x):

       print(number, end=" ")

elif y > x:

   for number in range(x+1, y):

       print(number, end=" ")

else:

   print("There are no integers between {} and {}".format(x, y))

Explanation:

*The code is in Python.

Ask the user to enter the two integers, x and y

Since we want our program to run regardless of which entered value is larger, we need to compare the numbers to be able to create the loop that prints the numbers.

Check if x is greater than y. If it is, create a for loop that iterates from y+1 to x-1 and print the numbers

Otherwise, check if y is greater than x. If it is, create a for loop that iterates from x+1 to y-1 and print the numbers

If none of the previous part is executed, print that there are no integers between

TRUE or FALSE: CSS is used to style web pages.

Answers

Answer:

true

Explanation:

HTML is the structure and CSS is the design

Part1) Given 3 integers, output their average and their product, using integer arithmetic.
Ex: If the input is:
10 20 5
the output is:
11 1000
Note: Integer division discards the fraction. Hence the average of 10 20 5 is output as 11, not 11.6667.
Note: The test cases include three very large input values whose product results in overflow. You do not need to do anything special, but just observe that the output does not represent the correct product (in fact, three positive numbers yield a negative output; wow).
Submit the above for grading. Your program will fail the last test cases (which is expected), until you complete part 2 below.
Part 2) Also output the average and product, using floating-point arithmetic.
Output each floating-point value with two digits after the decimal point, which can be achieved by executing
cout << fixed << setprecision(2); once before all other cout statements.
Ex: If the input is:
10 20 5
the output is:
11 1000
11.67 1000.00

Answers

Answer:

The program is as follows:

#include <iostream>

#include <iomanip>

using namespace std;

int main(){

   int num1, num2, num3;

   cin>>num1>>num2>>num3;

   cout << fixed << setprecision(2);

   cout<<(num1 + num2 + num3)/3<<" ";

   cout<<num1 * num2 * num3<<" ";

   return 0;

}

Explanation:

This declares three integer variables

   int num1, num2, num3;

This gets input for the three integers

   cin>>num1>>num2>>num3;

This is used to set the precision to 2

   cout << fixed << setprecision(2);

This prints the average

   cout<<(num1 + num2 + num3)/3<<" ";

This prints the product

   cout<<num1 * num2 * num3<<" ";

1- By using C++ programming language write a program which displays the Fibonacci Series numbers. Note: The number of elements is taken as in input from the user Hint: The Fibonacci Sequence: 0,1,1,2,3,5,8,13,21,34,55.. .

Answers

Answer:

i hope this helpful for you

Explanation:

Example 1.

#include <iostream>

using namespace std;

int main() {

   int n, t1 = 0, t2 = 1, nextTerm = 0;

   cout << "Enter the number of terms: ";

   cin >> n;

   cout << "Fibonacci Series: ";

   for (int i = 1; i <= n; ++i) {

       // Prints the first two terms.

       if(i == 1) {

           cout << t1 << ", ";

           continue;

       }

       if(i == 2) {

           cout << t2 << ", ";

           continue;

       }

       nextTerm = t1 + t2;

       t1 = t2;

       t2 = nextTerm;

       

       cout << nextTerm << ", ";

   }

   return 0;

}

Example 2.

#include <iostream>

using namespace std;

int main() {

   int t1 = 0, t2 = 1, nextTerm = 0, n;

   cout << "Enter a positive number: ";

   cin >> n;

   // displays the first two terms which is always 0 and 1

   cout << "Fibonacci Series: " << t1 << ", " << t2 << ", ";

   nextTerm = t1 + t2;

   while(nextTerm <= n) {

       cout << nextTerm << ", ";

       t1 = t2;

       t2 = nextTerm;

       nextTerm = t1 + t2;

   }

   return 0;

}

describe all the main stress causal agents​

Answers

Answer:

Causes of Stress

Being unhappy in your job.

Having a heavy workload or too much responsibility.

Working long hours.

Having poor management, unclear expectations of your work, or no say in the decision-making process.

Working under dangerous conditions.

Being insecure about your chance for advancement or risk of termination.

Joe has just started the Security Module. He wants to get through it as quickly as possible and take the Quiz. As he clicks through the unit, he sees a bunch of text with some activities sprinkled throughout, and is trying to decide how to proceed.

Required:
Which strategies would likely be most effective and efficient for Joe?

Answers

Answer:

Joe should read the explanatory text and complete the learning activities.

Explanation:

Given

See attachment for options

Required

Best strategy to get through the module

First off, rushing through the activities and taking guess for each question (as suggested by (a)) will not help him;

He may complete the activities but sure, he won't learn from the module.

Also, reading through the units without completing the activities is not an appropriate method because Joe will not be able to test his knowledge at the end of the module.

The best strategy to employ is to read through the units and complete the activities, afterwards (option (b)).

Write a program with a function that accepts a string as an argument and returns the number of uppercase, lowercase, vowel, consonants, and punctuation that the string contains. The application should let the user enter a string and should display the number of uppercases, lowercases, vowels, consonants, and punctuations that the string contains.

Answers

Answer:

Explanation:

The following code is written in Python. It is a function called checkString that takes in a string as an argument and loops through each char in that string and checking to see if it is lowercase, uppercase, vowel, consonant, or punctuations. It adds 1 to the correct variable. At the end of the loop it prints out all of the variables. The picture below shows a test output with the string "Brainly, Question."

def checkString(word):

   uppercase = 0

   lowercase = 0

   vowel = 0

   consonants = 0

   punctuation = 0

   vowelArray = ['a', 'e', 'i', 'o','u', 'y' ]

   consonantArray = ['b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'y', 'z']

   punctuationArray = ['.', '!', '?', ',', ';', '(', ')']

   for char in word:

       if char.isupper():

           uppercase += 1

       else:

           lowercase += 1

       if char.lower() in vowelArray:

           vowel += 1

       elif char.lower() in consonantArray:

           consonants += 1

       if char in punctuationArray:

           punctuation += 1

   print('Uppercase: ' + str(uppercase))

   print('Lowercase: ' + str(lowercase))

   print('Vowels: ' + str(vowel))

   print('Consonants: ' + str(consonants))

   print('Punctuations: ' + str(punctuation))

Other Questions
the value of permittivity of free space (0) is _____ A key part of US foreign policy is building relationships with allies.How does the United States benefit from having allies?A. Allies guarantee that the United States has good relationships with its adversaries.B. Allies create and implement United States foreign policy around the globe.C. Allies work with the United States to achieve common interests and goals.D. Allies ensure United States exports are not subject to tariffs in their countries. 78, 68, 75, 65, find the next term Can someone help me pls4. Find (5.8 104) + (7.17 x 10).Express you answer in scientificnotation. Show your work. Which is a function of the cardiovascular system?to move waterto eliminate wastefrom the bodyto provide structural to transport gasessupport for the body throughout the body throughout the bodyMusic of Read this excerpt from Sea Fever by John Masefield.And the wheels kick and the winds song and the white sails shaking,And a grey mist on the seas face, and a grey dawn breaking,Which statement best describes how Masefield creates a hopeful mood in the excerpt?The free form flows cheerfully and unpredictably.The free form creates a sentimental conversation between man and sea.The fixed meter and predictable rhyme scheme create an upbeat rhythm.The fixed meter imitates the rhythm of a military march or parade. Can someone help with with c please? I need help QUICK!! 20 pointsWhich of the following is/are formed as gravity pulls increasing amounts of dust and debris in a nebula together?a. the solar windb. meteorsc. planetesimalsd. meteorites A laundry basket contains 15 socks, of which 5 are yellow.What is the probability that a randomly selected sock will be yellow?Write your answer as a fraction or whole number. What was the effect of the Berlin Airlift?1) East Germany and West Germany united.2) The Soviet Union gained control over West Berlin.3) West Berlin remained free from communist control. .4) The United States lost influence in the region. Please help me if you can it would mean a lot! How many grams H2 are needed to react with 2.80 g of N2? Which of the following lists is in order from smallest to largest? 1.4, 1/4 ,14% 1/4 , 14%, 1.4 14%, 1/4 , 1.4 1.4, 14%, 1/4 that is to the burning eye of the sun paragraph 11 I have no idei hellppppp Answer in the proper number of significant numbers23.4 x 14 please help asap I will give you 15 points. no links or ill report you Sah Inc's last free cash flow was $1.75 million. Its free cash flow growth rate is expected to be constant at 25% for 2 years, after which free cash flows are expected to grow at a rate of 6% forever. Its weighted average cost of capital WACC is 12%. Huxley has $5 million in short-term investments and $7 million in debt and has 2 million shares outstanding. What is the best estimate of the current intrinsic stock price What is the value of x in the figure below? If necessary, round your answer tothe nearest tenth of a unit.X12D 4 BA. 3.1OB. 12C. 6.9O D. 4 is y=2x^3 an even or odd function or neither