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
jenyasd209 [6]
3 years ago
8

AP CSP - Write a program that takes 10 random numbers from 1 to 12 inclusively and averages them together.

Computers and Technology
1 answer:
Amanda [17]3 years ago
3 0

Answer:

follows are the correct python code to this question:

import random as r#import random package as r

import statistics as s #import statistics package as s

l= r.sample(range(0,12),10)#defining l variable that use random function to store 10 random numbers

avg= s.mean(l)#defining avg variable for calculate average of l

print('List of random number are: ', l)#print list of random numbers

print("The random number Average is: ", avg)#print average value

Output:

List of random number are:  [4, 10, 6, 0, 3, 5, 1, 7, 11, 2]

The random number Average is:   4.9

Explanation:

In question 1:

In the given code, two packages are imported, which are "random and statistics", in which "random" is used to generate a random number, and "statistics" is used to calculate the average value.

In the code, the "l" variable is used, which uses a random function and store 10 random numbers, and an "avg" variable is defined that calculates the average value. In the last step, the print method is used that print number and its average value.

In question 2:

The given code is wrong because it only calls the "random" method, which is not defined.

You might be interested in
"when a dynamic web page is requested, the web server passes the request to"
nalin [4]
System operations of the website u are  asking to access
7 0
3 years ago
What is a functionalist perspective of cell phones, internet and personal computers?
Sedbober [7]
<span>As these technologies are rapidly evolving a functionalist would say that they unbalance the equilibrium of the social state, and is therefore undesirable as there is more interaction and adaptation of habits from other societies. But they also say that it's not a good thing to change immediately because it might disrupt the society. Therefore it has to change slowly. </span>
3 0
3 years ago
Why are laptop employment of computer popular these days​
steposvetlana [31]

Answer:

Because due to pandemic all the offices and employment sector are closed physically and to make their work smoothly people are preferring virtual platforms with the concept of work from home .

I hope it is helpful and mark me as brainlest and follow me plllzzz♥️♥️

7 0
3 years ago
Write a C program that will load entries from a file containing details of books and prints them.
Sladkaya [172]

Answer:

........

Explanation:

3 0
3 years ago
These are Spealized graphics programs gor editing or modifying digital photographs
lisov135 [29]
They fall under the category of “Photo Editing Software” or “Image Manipulation Software”
8 0
3 years ago
Other questions:
  • Your network employs basic authentication that centers on usernames and passwords. However, you have two ongoing problems. The f
    13·1 answer
  • To insert an endnote, which steps should you follow?
    8·1 answer
  • Why is it important to not get distracted while driving?
    13·2 answers
  • Why is a class called a factory of objects
    11·1 answer
  • You have to display or connect to network shares on remote computers. Which command-line utility will you use to accomplish the
    10·1 answer
  • Freeeeeeee brainliest!!!
    10·1 answer
  • Imma say something random...
    13·2 answers
  • Mark and his team are working on a project that is due for delivery in the next few days. The team is using project management t
    10·1 answer
  • How does a cell phone change the<br> incoming signals from a caller into sound that<br> you can hear
    10·2 answers
  • Binary subtraction<br> Subtract (111) from (1000)
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!