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
r-ruslan [8.4K]
3 years ago
12

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).
Computers and Technology
1 answer:
umka21 [38]3 years ago
3 0

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.

You might be interested in
5. Many large organizations have had their database system hacked and customer data stolen. How should the security for the data
yawa3891 [41]

Answer:

Security is very crucial for any system. Vulnerability can be exposed on different levels which includes database breach, network level attacks and application level attacks. Different kinds of attacks can be carried out for different components. Attacks carried out on databases are different from other kinds of attacks.  

Attacks on databases can be because of any of the following exposed vulnerability.  

  • Poor system design and weak architecture
  • Incorrect configurations  
  • SQL injection attacks  
  • Weak Authentication
  • Brute Force attacks on user credentials
  • Improper privilege mechanisms  
  • Privilege abuse and excessive access.  
  • Poor design and flaws in programming
  • Data loss and information corruption

Security of database systems should be designed by considering best database security design practices. Network security will ensures that all the networks level attacks are detected and mitigated which includes DDOS attacks, Syn flood attacks, Session Attacks, DOS attacks and web security will focus on detecting and protecting attacks on web applications and on application layer attacks. This includes XSS attacks, XML attacks DOS attacks, DDOS attacks, Slow DDOS attacks, JSON violations, Protocol violations etc. However, Security of database will be different than the rest of security and should be based on following best practices

 

  • Physical and Network Access Security.
  • Access control by managing the database access strictly.
  • Encryption of Data
  • Authentication  
  • Web Application Firewalls  
  • Controlling Database Integrations
  • Manual and Scheduled Backups through secured channels.  
  • Auditing and Logging
  • Reporting and Monitoring

Explanation:

<em>Physical and Network Access Security is essential </em>as the database will be hosted on many physical servers or cloud servers. If the databases are hosted on web or cloud servers and gaining access to such servers will eventually give out root user permissions.

Attackers can have control access of databases as root users if they succeed in getting into physical servers.Use of network firewalls and Intrusion detection and prevention systems will provide security against physical system access.

<em>Access control </em> will allow only specific users to access the database. User Based access control will give restricted or policy based privileges to different users. An user will be allowed to perform only certain actions in such cases which will avoid user-access abuse.  

<em> </em><em>Data encryption</em><em> </em>will make sure that eves dropper will not be able to read any data during transmission or during inter process calls. Authentication mechanisms will help to use strong cryptic authentications for users. Use of great encryption, key exchange and hashing algorithms will harden the security and will make databases robust.  

<em> Web Application firewalls</em> will provide a strong security against SQL injection attacks, database connection flood attacks, other web related attacks which will safeguard the databases at the cloud storage and also will block the attacker by flagging them.  

<em>Best coding practices</em> and vulnerability scanning and assessment will secure all the database integrations. <em>Database integrations</em><em> </em>with other components needs to be carried out with utmost care by making sure to analyse all the impacted areas.  

It is always a good practice to have <em>scheduled and manual backup of databases</em> which will be useful against data corruption because of erroneous user actions. This will ensure that data is safe and can be recovered during toxic situations. This will help to control the damage.  

<em> Auditing of logs</em> to verify all the actions performed on the database by different users is necessary as it will help to analyse any misbehavior or compromised user access. <em>Monitoring and reporting</em> will make sure that only the right user has the right access and also it will alert any attacks on the database system.

8 0
4 years ago
The term 'dns' stands for
mamaluj [8]
A. Domain Name System
8 0
3 years ago
Read 2 more answers
_____ describes the way the components in a network interact.​
My name is Ann [436]
Logical Topology describes the way that components in a network interact.  Logical topology is the arrangement of devices on a computer  network and how they communicate with one another.  It describes how signals act on the network.  his type of topology is not interested in how devices on the network are connected but how they communicate with each other.<span> </span>
5 0
3 years ago
Read 2 more answers
. Write Java statements to instantiate a random number generator object and generate a random integer between 100 and 250 (inclu
Umnica [9.8K]

Answer:

//import Random package

import java.util.Random;

class Main

{

public static void main (String[] args) throws java.lang.Exception

{

   try{

    /* create an object of Random class. this will generate random number

    in a given range. */

       Random rand = new Random();

       // create two variables and assign 100 and 250 to

       int l = 100;

       int h = 250;

       //generate the random number between 100 & 250 (inclusive)

       int ran_num = rand.nextInt((h+1)-l) + l;

       System.out.println("random number is: "+ran_num);

   }catch(Exception ex){

       return;}

}

}

Explanation:

Import "import java.util.Random" package.In this package, Random class exist. With the help of this class's object, we can generate a random number between a given range.Here we have to generate a random number between 100 to 250(inclusive). So "(h+1)-l" will be 151 and the number generate is in the range of 0-150. if we  add 100 to it, then random number will be in range of 100 to 250.

Output:

random number is: 158

6 0
3 years ago
If a company becomes a technology company ,what does this mean to employees
MA_775_DIABLO [31]
A place to work. Of course
5 0
3 years ago
Other questions:
  • what occurs when two adjacent conductors make electrical contact and by-pass a portion of the circuit?
    7·1 answer
  • True false) ther are five arrow keys on the keborad​
    9·1 answer
  • Value or power of a network grows exponentially as a function of the number of network members. this is known as ________ law.
    8·1 answer
  • For any two documents x and z, define k(x, z) to equal the number of unique words that occur in both x and z (i.e., the size of
    15·1 answer
  • If a menu-driven program uses a loop to redisplay the menu after a selected operation has been performed, the menu should probab
    14·1 answer
  • Which of the following is productivity strategy for collaboration?
    6·1 answer
  • If you decide you want to meet someone you met online, what should you do first? A. Tell your best friend. B. Call the person yo
    12·1 answer
  • How to open microsoft word
    12·2 answers
  • Accept total number of participants (B) in class. A group of
    12·1 answer
  • Distinguish between principles, guidelines and standards, using examples of each to illustrate​
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!