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
s344n2d4d5 [400]
3 years ago
10

Consider the following code: x = 17 y = 5 print (x % y) What is output?

Computers and Technology
1 answer:
Ierofanga [76]3 years ago
7 0

Answer:

The output to given python code is "2".

Explanation:

The description of the python program as follows:

  • In the given code, two variable is defined that is, x and y in which contain assign value that is 17 and 5.
  • In this code, variable x modules variable y that is (x%y). In python or any other programming language, modules (%) will give a remainder that is "2".
  • To print calculated value we use a print function, that prints its value.
You might be interested in
Which program will have the output shown below?
Ipatiy [6.2K]

Answer: >>> for count in range(10, 14):

   print(count)

Explanation:

just took the test on edg

4 0
3 years ago
Read 2 more answers
List out two ways to execute the script.​
castortr0y [4]

Answer:

1) Execute Shell Script Using File Name. Use the shell script file name to execute it either by using it's relative path or absolute path as shown below

2) Execute Shell Script Using Source Command.

7 0
3 years ago
Read 2 more answers
Construct a class that will model a quadratic expression (ax^2 + bx + c). In addition to a constructor creating a quadratic expr
stich3 [128]

Answer:

Following are the code to this question:

#include <iostream>//header file

#include<math.h>//header file

using namespace std;

class Quadratic//defining a class Quadratic  

{

private:

double a,b,c;//defining a double variable

public:

Quadratic()//defining default constructor

{

a = 0;//assigning value 0  

b = 0;//assigning value 0  

c = 0;//assigning value 0  

}

Quadratic(double a, double b, double c)//defining a parameterized constructor  

{

this->a = a;//use this keyword to hold value in a variable

this->b = b;//use this keyword to hold value in b variable

this->c = c;//use this keyword to hold value in c variable

}

double getA() //defining a get method  

{

return a;//return value a

}

void setA(double a)//defining a set method to hold value in parameter

{

this->a = a;//assigning value in a variable

}

double getB() //defining a get method  

{

return b;//return value b

}

void setB(double b)//defining a set method to hold value in parameter  

{

this->b = b;//assigning value in b variable

}

double getC() //defining a get method

{

return c;//return value c

}

void setC(double c)//defining a set method to hold value in parameter

{

this->c = c;//assigning value in c variable

}

double Evaluate(double x)//defining a method Evaluate to hold value in parameter

{

return ((a*x*x)+(b*x)+c);//return evaluated value

}

double numberOfReal()//defining a method numberOfReal to calculates the real roots

{

return (b*b)-(4*a*c);//return real roots

}

void findroots()//defining a method findroots

{

double d=numberOfReal();//defining double variable to hold numberOfReal method value

if(d<0)//use if block to check value of d less than 0

cout<<"Equation has no real roots"<<endl;//print message

else

{

double r1=(-b+sqrt(numberOfReal()))/(2*a);//holding root value r1

double r2=(-b-sqrt(numberOfReal()))/(2*a);//holding root value r2

if(r1==r2)//defining if block to check r1 equal to r2

cout<<"Equation has one real root that is "<<r1<<endl;//print message with value

else//else block

cout<<"The equation has two real roots that are "<<r1<<" and "<<r2<<endl;////print message with value

}

}

void print()//defining a method print  

{

cout<< a << "x^2 + " << b << "x + " << c <<endl;//print Quadratic equation

}

};

int main()//defining main method  

{

Quadratic q(5,6,1);//creating Quadratic class object that calls parameterized constructor

q.print();//calling print method

cout<<q.numberOfReal()<<endl;//calling method numberOfReal that prints its value

q.findroots();//calling method findroots

cout<<q.Evaluate(-1);//calling method Evaluate that prints its value

return 0;

}

Output:

5x^2 + 6x + 1

16

The equation has two real roots that are -0.2 and -1

0

Explanation:

In the above code, a class "Quadratic" is declared, which is used to define a default and parameter constructor to holds its parameter value.

In the next step, the get and set method is defined that holds and returns the quadratic value, and "Evaluate, numberOfReal, findroots, and print" in the evaluate method a double variable is used as a parameter that returns evaluated value.

In the "numberOfReal" method it calculates the real roots and returns its value. In the "findroots" method a double variable "d" is declared that hold "numberOfReal" value,

and use a conditional statement to check its value, and in the print method, it prints the quadratic equation.

In the main method, the lass object it calls the parameterized constructor and other methods.

5 0
3 years ago
For this assignment: Analyze and describe the network infrastructure. Describe and explain the various policies that will be nee
mamaluj [8]

Answer:

Explanation:

The Network infrastructure shown here are LAN and WAN. Wired and wireless communications.

The Various policies are:

1. Group related items together, for instance, grouping all Windows servers, into one virtual LAN (VLAN). Other asset groups might include infrastructure (routers, switches, VPNs and VoIP) in one VLAN and security assets (IDS, firewalls, web filters and scanners) may be grouped in another.

2. In general, it is good to adopt a default deny access posture for each VLAN.

3. Network segmentation is a very significant, long-term project, but each step along the way increases security. Log all traffic between segments to determine what is normal and needed for effective functioning.

4. Network segmentation is undeniably and unquestionably an effective component in a defense in depth strategy. Organizations that implement it must be prepared to manage scores of firewalls, switches and routers, each with hundreds of rules, all of which may be affected by the network segmentation process and potentially by updates and changes, even after it is in place.

5. Contribute to a secure WAN environment for all connected departments, offices,

agencies, boards, and commissions

6. Provide a uniform security framework to secure the integrity, confidentiality, and availability of info and info systems, at the WAN level.

7. Provide, in balance with operational requirements, legislative requirements, and information sharing agreements, the minimum WAN security requirements.

8. Raise awareness of information and information technology security needs for all users of the WAN by providing the security principles, requirements.

9. Define the clear roles and responsibilities of all users of the WAN, particularly WAN security staff.

* Vulnerabilities and exposures

1. Data requiring special protection such as credit card numbers that need to comply with PCI-DSS or patient information that is subject to HIPAA should be isolated from other data and put in their own VLANs.

2. Your aim is to limit access to sensitive information to those who need it within the organization and to create roadblocks to stop or slow intruders, who may have broken through one layer of security, from doing further damage.

3. Network segmentation is not a “set and forget” undertaking. The network access policy, defined in firewalls, routers and related devices, changes constantly to cater to new business requirements. Ensure that new changes do not violate your segmentation strategy requires a good degree of visibility and automation.

4. Reducing internal breaches and the infiltration of malicious software(malware). This

internal defense requires significant involvement with individual devices

on a network, which creates greater overhead on network administrators.

*Risks

1. Malicious software, also known as malware,makes its way onto a network through

employees, contractors and visitors. Personal laptops, wireless gadgets,

and of course the USB flash drives, all these provide excellent vectors through which

malware can enter the workplace.

2. Hackers, worms, spammers and other security dangers of the Internet via LAN.

3. The various vulnerabilities on your network represent potential costs — time, money and assets — to your library. These costs, along with the chance someone will exploit these vulnerabilities, help determine the level of risk involved.

4. Since the cost of adding another Internet connection, increasing the speed of the current connection or purchasing complex network monitoring equipment might be too prohibitive, the library has a higher tolerance for a periodically slow Internet connection.

5. External flash drives and other media are also concern when those enters the network.

6. The lost or stolen handheld device poses some serious risks if not incorporated into your network security policy. Such devices are often capable of being formatted of all company content remotely in the case of theft or robbery.

*Security measurements:

1. Address Resolution

Protocol (ARP) spoofing, Denial of Service (DoS) attacks such as Tear Drop

or Ping of Death.

2. In addition, network administrators can form a policy whereby network

users are required to install and maintain anti-malware scanners in their devices.

3. Many tools exist to check the existing security state of your network. The Microsoft Baseline Security Analyzer, Nmap .

4. Risk assessment is a combination of both quantifying (the cost of the threat) and qualifying (the odds of the attack).

5. Firewalls.

6. Antivirus systems.

7. Intrusion-detection systems (Host-based IDS,Network-based IDS)

8. Port scanners.

9. Network sniffers.

10. A vulnerability scanner is like a port scanner on steroids.

*Unnecessary Ports

1. It is not easy to say which ports exactly but we should know that the service ports which are open among 65,535 ports and although not exactly sure what service is running , it is safer to check the port and close it as "A Closed Port is a Safe Port".

7 0
3 years ago
A cloud implementation engineer successfully created a new VM. However, the engineer notices the new VM is not accessible from a
Rina8888 [55]

Answer:

Option A.

Explanation:

Incorrect subnet is the most likely problem in this scenario.

4 0
3 years ago
Other questions:
  • What combination of words and boolean operators would display all audio files about chiropractic?
    6·1 answer
  • Match each invention with its effects on the age of exploration.
    6·2 answers
  • If the physical memory size is doubled without changing any of its other parameters, the number of entries in the page table
    5·1 answer
  • I WILL GIVE BRAINLIEST TO WHO ANSWERS FIRST AND CORRECTLY.
    6·2 answers
  • Identify traits of entrepreneurs. Check all of the boxes that apply.
    11·1 answer
  • Complete the sentence
    6·2 answers
  • Why is it hard for some people to keep a promise even one that they make to themselves​
    10·2 answers
  • You can merge the cells using the rowspan and colspan attribute of the tag <br> true or false​
    7·1 answer
  • Define operating system?explain the types of operating system on the basis of use.​
    7·1 answer
  • When copper wires are bundled together, they are susceptible to ____________, a form of interference where the signals leak out
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!