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]
2 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]2 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
Which is worse: Fast charging (Due to heat) or unplugging before reaching full capacity (On a normal charge)?
Ray Of Light [21]
Unplugging before reaching Capacity
4 0
3 years ago
B. Some of Company X's new practices and systems are unethical. Business ethics is a set of codes
Artemon [7]

Answer:

They are changing schedules without proper notice, cutting workers without proper notice and falsely advertising.

Explanation:

8 0
2 years ago
Does anyone know what this logo is??
scoray [572]

Answer:

I have got no idea it looks like an older style

8 0
1 year ago
Read 2 more answers
"In about 100 words, describe the idea behind software as a service (SaaS). In your answer, include at least three examples of e
Mama L [17]

Answer:

Explanation:

Saas refers to software as a service and can also be called software on demand .

It Isa software that is deployed over the internet rather than requiring to install an application .It offers different devices such as pay as you go , subscription model and service on demand model .

Only a compatible browser is needed to access the software .

Electronic packages or components that aree offered as an Saas

1)Shopify

2)Big commerce

3)Slack

3 0
3 years ago
1
raketka [301]

1

they were crafted in stained-glass art in religious buildings

2

puzzle games

3

motion-capture devices (e.g., Kinect, WiiMote

4

puzzle

simulation

5 0
3 years ago
Other questions:
  • Which of the following is the largest disadvantage of hydropower?
    8·2 answers
  • SOMEONE PLEASE HELP ASAP!!
    14·2 answers
  • PLEASE HELP!
    13·2 answers
  • Identify the layout in which you will be able to view and edit the header and footer
    12·1 answer
  • Which sentence uses a pair of synonyms? Because there was so much shouting, many of the protestors began screaming in order to b
    6·2 answers
  • Lets say if my computer shut down every 10 minutes. What can you do to solve the problem. Hint: Use these word in you answer: ha
    10·2 answers
  • Explain any 10uses of computer that are specific to your field of study giving appropriate examples​
    13·1 answer
  • Which of the following is NOT a reason to include comments in programs
    10·2 answers
  • outline 4 IDE features that makes software development much faster and more convenient than other alternatives.​
    9·1 answer
  • suppose one packet switches between a sending host and a receiving host. the transmission rates between the sending host and the
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!