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
What are some of the ways you can use bitlocker encryption? (choose all that apply?
nasty-shy [4]
Bitlocker Encryption can be used during the process of authenticating your computer with a TPM, during the process of authenticating your account with a USB flash drive, and most of the authentication through text messages.
3 0
3 years ago
Which US electronics company was the pioneer in home video game consoles
drek231 [11]

This is a list of home video game consoles in chronological order, which includes the very first home video game consoles ever created, such as first generation Pong consoles, from the first ever cartridge console Odyssey, ranging from the major video game companies such as Magnavox, Atari, Nintendo, Sega, NEC, 3DO, SNK, Sony, Microsoft to secondary market consoles.


The list is divided into eras which are named based on the dominant console type of the era, though not all consoles of those eras are of the same type. Some eras are referred to based on how many bits a major console could process. The "128-bit era" (sixth generation) was the final era in which this practice was widespread.[citation needed]


This list does not include other types of video game consoles such as handheld game consoles, which are usually of lower computational power than home consoles due to their smaller size, microconsoles, which are usually low-cost Android-based devices that rely on downloading, or dedicated consoles which have games built in and do not use any form of physical media. Consoles have been redesigned from time to time to improve their market appeal. Redesigned models are not listed on their own.

7 0
3 years ago
PLEASE ANYONE!!which present margins would be best to get the most information to fit on the page​
-Dominant- [34]

Answer:

Normal Margin is fit on the page. The default margins for Microsoft Word is normal margin.                                      

Explanation:

The paper visual effect give the document’s theme and quality. Margins send visual effects. Making a document right helps you to send the right message to readers. Use a small paper and adding a border.

You can change the page layout that people notice first with size, orientation, and margins.

Page margins make your document readable. Margins make the document more readable, make text look inviting, and given reviewers.

With narrower margins, you can reduce more words on-page.

To many words in a line make it difficult to read the document.

Margins are of many types

  • Normal Margin
  • Narrow margins
  • Moderate margins
  • Wide margins

Normal gives an equal inch to all sides of the page.

Narrow margins give little room to each column.

Average margins squeeze words from left and right.

Wide gives space when proofing the manuscript.

3 0
2 years ago
Read 2 more answers
1st answer will get brainliest!
valentina_108 [34]

The answer is program!

5 0
2 years ago
Read 2 more answers
As Jason walks down the street, a large raven starts squawking at him and flapping its wings. Jason thinks to himself ‘That bird
UNO [17]

Answer:

Answer to the following question is anthropomorphism.

Explanation:

Anthropomorphism is considered as the error in the following context of the scientific reductionism. Anthropomorphize is the source of an error that needs to reconsider.

Anthropomorphism is an attribute of the human qualities, emotions, thoughts, motivation, intentions, and characteristics to the non-living beings or the nonhuman beings, things or objects.

8 0
3 years ago
Other questions:
  • You use different office apps to accomplish specific tasks, such a creating a newsletter or producing a sales presentation, yet
    8·1 answer
  • A _____ is an employment test that evaluates your specific job-related abilities, such as typing speed. It is recommended that y
    6·2 answers
  • When cleaning a firearm, what end of the firearm should you generally clean from?
    11·2 answers
  • Program Rock.java contains a skeleton for the game Rock, Paper, Scissors. Open it and save it to your directory. Add statements
    10·1 answer
  • Anna’s computer will not power on. What aspect of the computer should Anna check (hardware or software)? How can Anna work to re
    5·1 answer
  • Suppose that f is a function with a prototype like this: void f(________ head_ptr); // Precondition: head_ptr is a head pointer
    6·1 answer
  • Computers help eliminate that repetitive of manual task. How can this benefit you in in your overall career
    7·2 answers
  • Dr. Wayne is trying to developing techniques to cure Parkinson’s disease by inserting genetic material into patients’ cells to c
    12·1 answer
  • A good sentence about art
    9·1 answer
  • Which term best describes these lines?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!