Write a class called Person that has two data members - the person's name and age. It should have an init method that takes two values and uses them to initialize the data members.Write a separate function (not part of the Person class) called std_dev that takes as a parameter a list of Person objects (only one parameter: person_list) and returns the standard deviation of all their ages (the population standard deviation that uses a denominator of N, not the sample standard deviation, which uses a different denominator).

Answers

Answer 1

Answer:

class Person(object):

   def __init__(self, name, age):

       self.name = name

       self.age = age

 

def std_dev(person_list):

   average = 0

   for person in person_list:

       average += person.age

   average /= len(person_list)

   total = 0

   for person in person_list:

       total += (person.age - average) ** 2

   return (total / (len(person_list) )) ** 0.5

Explanation:

The class "Person" is a python program class defined to hold data of a person (name and age). The std_dev function accepts a list of Person class instances as an argument and returns the calculated standard deviation of the population.


Related Questions

Select all correct answers. Technology helps:

A) make things cooler

B) make Things easier

C) make things faster

D) solve Problems

Answers

Answer:

a,b,c,d

Explanation:

it helps with all of those things

Answer:

D. Solve Problems

Explanation:

Technology has played a crucial role in keeping so many people alive through life support machines and other specialized health equipment. Technology also aids in the scientific research of new medicines and cures that are beneficial to the entire human race. Business and Commerce. Business is not as usual since the internet came into this world.

Any1??
Write the names of atleast 22 high-level programming languages

Answers

Answer:

1 Array languages

2 Assembly languages

3 Authoring languages

4 Constraint programming languages

5 Command line interface languages

6 Compiled languages

7 Concurrent languages

8 Curly-bracket languages

9 Dataflow languages

10 Data-oriented languages

11 Decision table languages

12 Declarative languages

13 Embeddable languages

13.1 In source code

13.1.1 Server side

13.1.2 Client side

13.2 In object code

14 Educational languages

15 Esoteric languages

16 Extension languages

17 Fourth-generation languages

18 Functional languages

18.1 Pure

18.2 Impure

19 Hardware description languages

19.1 HDLs for analog circuit design

19.2 HDLs for digital circuit design

20 Imperative languages

21 Interactive mode languages

22 Interpreted languages

23 Iterative languages

Explanation:

Most Information Technology careers require workers to perform their jobs in
A. a home office.
B. a business office.
C. a secure office.
D. an off-site office.

Answers

Answer:

b on edge 2020

Explanation:

Answer:

b

Explanation:

what benefit can we get form using computer in education?​

Answers

Teaches you technology uses, and what we can do with them

Write the command and explain about each formula in MS Excel


1. SUM

2. AVERAGE

3. MAx

4. MIN

5. COUNT

Answers

Answer:

1. SUM  --- The SUM function is used to sum all the values that are in a given range. Thus, for example, if you want to add the values between cells A1 and A3, you must write the following command: =SUM(A1:A10)

2. AVERAGE  --- The AVERAGE function allows you to average a range of values, throwing the average of these values in the cell where the function is typed. For example, if you want to average the values included between B1 and B3, you should write the following function: =AVERAGE (B1: B3).

3. MAX --- The MAX function, for its part, returns the maximum value of the values included in the function. For example, if the maximum value included between the values C1 and C3 is known, the following function must be written: =MAX (C1: C3).

4. MIN  --- The MIN function, in turn, allows to identify the minimum value of the range of values included in the function. For example, if the minimum value included between the values D1 and D3 is known, the following function must be written: =MIN (D1: D3).

5. COUNT --- The COUNT function, finally, is used to count all the cells that have numbers, which have been included in the range of the function. For example, if you want to count all cells that contain numbers between the values E1 and E3, you must write the following function: =COUNT (E1: E3).

The game world plays a crucial role in bringing the game story to life and often acts as a bridge between what two elements?

A) the game title and resolution
B) characters and their powers
C) internal conflict and external conflict
D) game mechanics and game story

Answers

Answer:

B Is actually the correct answer

DRAG DROP -A manager calls upon a tester to assist with diagnosing an issue within the following Python script:#!/usr/bin/pythons = "Administrator"The tester suspects it is an issue with string slicing and manipulation. Analyze the following code segment and drag and drop the correct output for each string manipulation to its corresponding code segment. Options may be used once or not at all.Select and Place:

Answers

Answer:

The output is to the given question is:

nist

nsrt

imdA

strat

Explanation:

The missing code can be defined as follows:

code:

s = "Administrator" #defining a variable that hold string value

print(s[4:8])#using slicing with the print method  

print(s[4: 12:2])#using slicing with the print method  

print(s[3::-1])#using slicing with the print method  

print(s[-7:-2])#using slicing with the print method    

In the above code, a string variable s is declared, that holds a string value, and use the multiple print method to print its slicing calculated value.

How to do brainliest

Answers

If the reply that someone put has a blue crown you click it and it will give them brainliest but it usually won’t work unless there are two answers

Organizations can use dictionaries to disallow passwords during the reset process and thus guard against easy-to-guess passwords.
a) true
b) false

Answers

Answer:

a) true

Explanation:

Cyber security can be defined as preventive practice of protecting computers, software programs, electronic devices, networks, servers and data from potential theft, attack, damage, or unauthorized access by using a body of technology, frameworks, processes and network engineers.

With cybersecurity theory, security standards, frameworks and best practices we can guard against cyber attacks and easy-to-guess passwords.

An example of best practices in cybersecurity is the use of alphanumeric password with certain composition and strength, such as a minimum of eight (8) characters. This would ensure there's a formidable wall to protect data and an unauthorized access or usage of the system network.

A dictionary attack typically involves accessing a list of commonly used passwords by end users rather than a random guess.

Hence, organizations can use dictionaries to disallow passwords during the reset process and thus guard against easy-to-guess passwords.

If you wanted to help your phone , a nonliving thing , perform the process of life which is to gain energy which would be the best description of what to do ?

Help

Answers

Answer:

d. plug it into the charger.

Explanation:

State what’s printed for each println in the code below:

public static void main(String args[ ])

{

MyClass theObj = new MyClass( );
theObj.gravy = 107.43;
String s = "hello";
int xray[] = {1, 2, 3, 4, 5};
double floozy = 97.4;
myMethod(floozy, theObj, xray, s );
System.out.println(floozy); // Problem 1:
System.out.println(theObj.gravy); //Problem 2:
System.out.println(xray[2]); //Problem 3:
System.out.println(s); //Problem 4:
}
public static void myMethod(double floozy, MyClass anObj, int a[ ], String s)
{
floozy = 13.1;
anObj.gravy = 10.001;
a[2] = 100; s = "good bye";
}

Answers

Answer:

Explanation:

Each of the following println statements will print the following values

ystem.out.println(floozy); // Problem 1:   97.4

System.out.println(theObj.gravy); //Problem 2:  107.43

System.out.println(xray[2]); //Problem 3:  100

System.out.println(s); //Problem 4: Hello

This is because out of all of the variables that the myMethod gives a value to, the only variable that is being saved back to the global variable in the main method is a[2]. The other variables are being saved as instance variables and not being returned. Therefore, when the println statements are called they target the local variables in the main method.

What is the recommended solution if a computer performs slowly?

Answers

Answer:

Not sure what the class/context is, but here's what I'd do to diagnose a problem like that:

- Check to see what programs have high utilization of system resources in task manager and end them

- Prevent background startup processes from occuring on restart or from running in the background during normal use

- Figure out what hardware component is bottlenecking the system and upgrade it (HDD to SSD would be one example)

- If the issue is malware related, I would "flatten" the PC by wiping the entire system and reinstalling the OS (though some malware can persist even across this)

Source: I've worked as labs support

If a computer is performing slowly, there are several recommended solutions one can try to improve its performance, such as closing unnecessary programs, restarting the computer, etc.

Reviewing the programs that automatically start when the computer boots up and disabling unnecessary startup programs to reduce the time it takes for the computer to start and free up system resources. The specific solution may vary depending on the computer's operating system, hardware, and specific performance issues. It's always a good idea to back up important files before making any changes to your computer's configuration. If the performance issues persist, seeking assistance from a computer technician or IT professional may be necessary.

Learn more about computers here.

https://brainly.com/question/32297640

#SPJ6

Use the factorial operation to evaluate 10!.
A) 9 x 8 x 7 x 6 x 5 x 4 x 3 x 2 x 1
B) 9 + 8 + 7 + 6 + 5 + 4 + 3 + 2 + 1
C) 10 + 9 + 8 + 7 + 6 + 5 + 4 + 3 + 2 + 1
D) 10 x 9 x 8 x 7 x 6 x 5 x 4 x 3 x 2 x 1

Answers

Answer:

D

Explanation:

The definition of n! is n x (n-1) x (n-2) x ... x 1.

So 10! = 10 x 9 x 8 x 7 x 6 x 5 x 4 x 3 x 2 x 1 i.e. D.

Answer:

D) 10 x 9 x 8 x 7 x 6 x 5 x 4 x 3 x 2 x 1

Explanation:

The problem here is to use the factorial method to find;

    10!

The factorial of any number is given as:

       a!  = (a - 1) x (a - 2) .........(a - n)

It is the product of any integer from 1 to that number.

So;

   10!   = 10 x 9 x 8 x 7 x 6 x 5 x 4 x 3 x 2 x 1

The solution is therefore 10 x 9 x 8 x 7 x 6 x 5 x 4 x 3 x 2 x 1

Difference between analog and digital computer ??

Answers

Answer:

The analogue computer works on a continuous signal. The digital computer works on a discrete signal. The output is a voltage signal, they are not exact values and are in graphical form.

A specification can be a written document, a set of graphical, a formal mathematical model, a collection of usage scenarios (or, use cases), a prototype, or any combination of these.
A. True
B. False

Answers

Answer:

The given statement is "True". A further explanation is given below.

Explanation:

The specification would be a necessary condition that is explicitly indicated, for obvious reasons, concerning the great components throughout the prototype of being something. A detailed explanation of that same performance aspects, normally with particular established standards, is presented in terms appropriate to lead to the creation both for real manufacturing and building methods of such a component with either the personality traits mentioned throughout the structural performance.

So the above is the appropriate response.

ve phenotypk percentages of the offspring​

Answers

It’s true have a nice day

Write a public static method named insert. The insert method should have the signature insert(String[] words, String newWord, int place), should return a boolean, and should function as described below.
When called, if place does not represent a valid index for words, then the method will return false to indicate the insertion could not be performed and do nothing else. Otherwise the method will insert the String newWord into the array words at the index place, moving each subsequent entry one place further and losing the final String in the array. The method will then return true to indicate the insertion has taken place.
Use the runner class to test this method: do not add a main method to your code in the U6_L4_Activity_One.java file or it will not be scored correctly.
Here is the runner code:
import java.util.Scanner;
public class runner_U6_L4_Activity_One{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
System.out.println("Enter array length:");
int len = scan.nextInt();
scan.nextLine();
String[] wordList = new String[len];
System.out.println("Enter values:");
for(int i = 0; i < len; i++){
wordList[i] = scan.nextLine();
}
System.out.println("Enter new String:");
String insWord = scan.nextLine();
System.out.println("Enter place:");
int pos = scan.nextInt();
System.out.println("Method return: " + U6_L4_Activity_One.insert(wordList, insWord, pos));
System.out.print("Array contents: {");
for(int i = 0; i < len-1; i++){
System.out.print(wordList[i] + ", ");
}
System.out.println(wordList[len-1]+"}");
}
}

Answers

Answer:

Explanation:

The following code was written in Java and performs the exact requirements listed in the question. It has also been tested by the runner code and works perfectly.

public static boolean insert(String[] words, String newWord, int place) {

               if (place > words.length) {

                   return false;

       } else {

                   for (int x = words.length - 1; x >= 0; x--) {

                       if (place == x) {

                           words[x] = newWord;

                           break;

                       } else {

                           words[x] = words[x-1];

                       }

                   }

                   return true;

               }

   }

Methods are group of code segments that are executed when evoked or called.

The insert public static method in Java, where comments are used to explain each line is as follows:

//This defines the method

public static boolean insert(String[] words, String newWord, int place) {

   //This returns false, if the place value is less than the word length

   if (place > words.length) {

       return false;

   }  

   //If otherwise

   else {

       //This iterates through the characters of the word, in reverse order

       for (int i = words.length - 1; i >= 0; i--) {

           //This inserts the new word into the array

           if (place == i) {

               words[i] = newWord;

               break;

           } else {

               words[i] = words[i-1];

           }

       }

       //This returns true

       return true;

   }

}

Read more about methods at:

https://brainly.com/question/13628934

Gamification and virtual reality is the future of education

Answers

Answer:

Education is expected to be the fourth largest sector for VR investment. VR in education is predicted to be a $200 million industry by 2020, and a $700 million industry by 2025. 97% of students would like to study a VR course.

Explanation:

Gamification and virtual reality is the future of education . I need a speech on this topic

Answers

Hahaha jsisienenwisjejwje

what is mass communication​

Answers

Hey there!

When you see the word “mass communication” think of an article written on the newspaper or a person interaction on a social media platform. You’re talking to a variety of LARGE groups but not physically there in their appearance, right? (This is an EXAMPLE.... NOT an ANSWER)

Here’s SOME examples

- Political debate campaigns

- Journalism (you could find some in articles / newspapers passages)

- Social Media Platforms

- A company PROMOTING their brand as a COMMERCIAL on the television/radio

Without further a do... let’s answer your question….......

Basically “mass communication”

is the undertaking of media coordination which produce and carries out messages with HUGE crowds/public audiences and by what the message process striven by their audience ☑️

Good luck on your assignment and enjoy your day!

~LoveYourselfFirst:)

1.16 LAB: Input and formatted output: House real estate summary Sites like Zillow get input about house prices from a database and provide nice summaries for readers. Write a program with two inputs, current price and last month's price (both integers). Then, output a summary listing the price, the change since last month, and the estimated monthly mortgage computed as (currentPrice * 0.051) / 12 (Note: Output directly. Do not store in a variable.).
Ex: If the input is:
200000 210000
the output is:
This house is $200000. The change is $-10000 since last month.
The estimated monthly mortgage is $850.0.
Note: Getting the precise spacing, punctuation, and newlines exactly right is a key point of this assignment. Such precision is an important part of programming.
import java.util.Scanner;
public class LabProgram {
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
int currentPrice;
int lastMonthsPrice;
currentPrice = scnr.nextInt();
lastMonthsPrice = scnr.nextInt();
/* Type your code here. */
}

Answers

Answer:

Please find the complete code and the output in the attachement.

Explanation:

In the code, a class "LabProgram" is defined, and inside the main method two integer variable "currentPrice and lastMonthsPrice" is defined that uses the scanner class object is used for a user input value, and in the next step, two print method is declared that print the calculate of the integer variable.

The program is an illustration of output formats in Java

The statements that complete the program are:

System.out.printf("This house is $%d. The change is $%d since last month.\n",currentPrice,(currentPrice - lastMonthsPrice));System.out.printf("The estimated monthly mortgage is $%.1f.\n",(currentPrice * 0.051)/12);

To format outputs in Java programming language, we make use of the printf statement, followed by the string literal that formats the required output

Take for instance:

To output a float value to 2 decimal place, we make use of the literal "%.2f"

Read more about Java programs at:

https://brainly.com/question/25458754

in java please
In this exercise, you will need to create a static method called findString in the MatchingString class that should iterate over String[] arr looking for the exact match of the String that is passed as a parameter.

Return the index of the array where the String is found; if it does not exist in the array, return -1.

For example, if the word “Karel” is passed in, your method would return 1.

Answers

Answer:

Explanation:

The following code is written in Java. It is a static method that takes in a String parameter and loops through the String array called arr comparing each element in the array with the word parameter that was passed. If it finds a match the method returns the index of that word, otherwise it will return -1

  public static int findString(String word){

               int index = -1;

               for (int x = 0; x < arr.length; x++) {

                       if (word == arr[x]) {

                               index = x;

                               break;

                       }

               }

               

               return index;

               

       }

Write a program that takes a first name and a major as the input and outputs a message with that name and major as shown below Ex. If the input is Nithya and Art the output is Nithya 18 majoring in Art. Use the names and majors of students in your breakout room to test your code. Note that to separate the name from the major as part of the input, you need to place these inputs on separate lines. For the example above, we would provide the input as follows: Nithya Art Hint If you directly add the names and majors inside the print statement, then the code would not work correctly since it is relying on the contents of the provided variables. You need to use these variables inside your print statement, so that regardless of the provided input, the output will always use those values and be as expected Hint. If your code does not pass the tests, make sure you do not have an extra space in your output. Remember. Python automatically adda a blank space between expressions separated by a comma LAD ACTIVITY 1161 LAB: Breakout Room Activity 0/15 main.py Load default template 1 username input() 2 najor - input() 5 6 7. the comments below, listing the names and majors of the students who were in the breakout room with you 9.1. May Finance 10. 2. Ronnte Econ 11.). Preston Accounting

Answers

Answer:

The program in Python is as follows:

name = input("Name: ")

major = input("Major: ")

print(name+" is majoring in "+major)

Explanation:

This line prompt user for username

name = input("Name: ")

This line prompt user for major

major = input("Major: ")

This line prints the name and major of the user

print(name+" is majoring in "+major)

A university with remote campuses, which all use different service providers, loses Internet connectivity across all locations. After a few minutes, Internet and VoIP services are restored, only to go offline again at random intervals, typically within four minutes of services being restored. Outages continue throughout the day, impacting all inbound and outbound connections and services. Services that are limited to the local LAN or WiFi network are not impacted, but all WAN and VoIP services are affected. Later that day, the edge-router manufacturer releases a CVE outlining the ability of an attacker to exploit the SIP protocol handling on devices, leading to resource exhaustion and system reloads. Which of the following BEST describe this type of attack?
A. DOS
B. SSL Stripping
C. Memory leak
D. Race condition
E. Shimming
F. Refactoring

Answers

Answer:

A & D.

Explanation:

In real time operating system, the best description for this type of attack explained in the question is;

DOS and Race Condition.

Because race condition takes place when 2 or more threads are able to both access and change shared data simultaneously ,while DOS is a good foundation to build a custom made Real time operating system.

Thus, options A & D are correct.

can you answer this question?

Answers

Answer:

The SIZE constant is not definedThe variable i should be defined at the start of the function, not within the condition of the while loopThe main function returns no value.  Generally they should return a zero on success.The printf text "%d" should actually be "%f".  %d treats the variable as though it's an integer.

Which function in spreadsheet software can be used to predict future sales or inventory needs?

Answers

create a forecast, Excel creates a new worksheet that contains both a table of the historical and predicted values and a chart that expresses this data. A forecast can help you predict things like future sales, inventory requirements, or consumer trends.

Answer:forecast

Explanation:

Assuming dataFile is an ofstream object associated with a disk file named payroll.dat, which of the following statements would write the value of the salary variable to the file
A) cout < B) ofstream C) dataFile << salary;
D) payroll.dat <

Answers

Answer:

dataFile << salary;

Explanation:

To write salary to a file (payroll.dat) using ofstream, you make use of the following instruction:

ofstream dataFile;

myfile.open ("payroll.dat");

myfile <<salary;

myfile.close();

This line creates an instance of ofstream

ofstream dataFile;

This line opens the file payroll.dat

myfile.open ("payroll.dat");

This is where the exact instruction in the question is done. This writes the value of salary to payroll.dat

myfile <<salary;

This closes the opened file

myfile.close();

Consider the following pseudocode:

Get the Sqrt of 9.
This pseudocode is an example of what?

A
An event that contains a parameter

B
A function that contains an argument

C
An object that contains a parameter

D
A class that contains an argument

Answers

Answer: sorry I couldn’t help but Pseudocode is an artificial and informal language that helps programmers develop algorithms. Pseudocode is a "text-based" detail (algorithmic) design tool. The rules of Pseudocode are reasonably straightforward. All statements showing "dependency" are to be indented. These include while, do, for, if, switch.

Explanation:

You have an image of building but there are people standing on the far left side. You would like to remove those people. Which tool do you need ?

Answers

Answer:

cropping tool

Explanation:

since the people are on the far left you can just crop the image

A user reports slow performance on a computer. A technician checks the computer and finds the RAM utilization Is very high. The technician restarts the computer, and the RAM use is still high. The technician discovers a program running in the background Is using most of the RAM. The user only uses this program once at the end of the year to produce a report. What steps should the technician take to improve the computer's performance?

Answers

Answer:

The answer is "disable the program on startup"

Explanation:

The technician simply disables the program on the startup, at this the utilization of the RAM is low. The startup tab is also known as an alternative in the initialization process of the system software, which is automatically started whenever the device boots. There has been an error. If you boot, the more applications you want to load the longer it will take to operate the computer.

Other Questions
help plz ill give brainliest What is the main difference between active and passive sonar Carrie is making a temporary ramp from the ground to the top of his patio so that he can roll a cart up to it to move furniture in. The surface of the patio is 39 above the ground and Gary wants the ramp to have a slope of no more than 0.375. What is the shortest horizontal distance he can have from the base of the patio to the base of the ramp 1^2321 = 2x1^2321 = 2x1^2321 = 2x1^2321 = 2x1^2321 = 2x1^2321 = 2x1^2321 = 2x Can someone help me with these answers please Find the LCM for 6 and 8 1. What kind of plant life dominates the coniferous forest biome? A. deciduous treesB. grassesC. small shrubsD. cone-bearing trees Explain why the expressions 8x(6-4) and 8x6-4 dont not have the same value even though they look very similar? HELP!! PLEASE EXPLAIN IT IN 2 complete sentences. (ITS ALGEBRA) Factor the quadratic expression completely.2x2 + 7x + 3 a candy shop contains a total of 300 items there are 125 chocolates 97 cookies and T number of truffles write an equation that represents the situation Which of the following is equal to the product of 32 and 1/4 ? 3) What is the name of the group of elements that are a good conductor of heat?MetalsMetalloidsNonmetalsNoble gases What do these stand for Humaneness may make one shed tears and be reluctant to apply penalties, but law makes it clear that such penalties must be applied. The ancient kings allowed law to be supreme and did not give in to their tearful longings. Hence it is obvious that humaneness cannot be used to achieve order in the state. Water from Californias northern mountains is pumped south along a 400-mile canal through the farming communities of the Central Valley. Not only is this canal system a marvel of modern engineering, its water fuels the states economic engine. In 2006, these farms produced $31 billion-worth of food and fiber, more than any other state. By contrast, world-wide ticket sales of Hollywood movies, a more famous export of California, totaled $25 billion that year. What inference can the reader make from this paragraph? A. The writer thinks moving water to the Central Valley is a good investment. B. The movie industry is more important to California than farming. C. The author thinks it is more important to eat than go to movies. D. Water is a precious resource and shouldn't be wasted on making movies. Maria and her friends ordered a pizza that cost $14.70. She paid $2.94 for her part. What percent of the total bill did she pay? plz solve anyoneplease help me the sum of forty-five and a number; evaluate when n=1.1 1. totenemostengotienetienes2 yovengovenimosvienevienen3 ltenemostiene tienentienes 4 ellas tenemos tengo tiene tienen PART A: Read the following excerpt from the passage.Soldiers are citizens of death's grey land,Drawing no dividend from time's to-morrows.What does the word dividend mean in the context of the sentence?O A. The poem uses "dividend to refer to payment from the military.B. The poem uses "dividend to refer to the soldier's anticipated military honors.C. The poem uses "dividend" sarcastically to refer to the traumatic experiences of war.D. The poem ues "dividend" figuratively to refer to the threat of death that will prevent them fromliving another day