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
otez555 [7]
3 years ago
13

Write an If/else statement to check whether host is online. If it is online, then print system is online otherwise print system

is unreachable.
Computers and Technology
1 answer:
Reika [66]3 years ago
4 0

Answer:

from socket import *

hostname = input('Enter the host to be scanned: ')

ip_add = gethostbyname(hostname)

connections = [ ]    

for i in range(133, 136):

   s = socket(AF_INET, SOCK_STREAM)

     

   conn = s.connect_ex((ip_add, i))

   print(conn)

   connections.append(conn)

if 0 in connections:

   print ('Host is online')

   s.close()

else:

   print ('system is unreachable')

Explanation:

The python source code above scans for all the available range of ports in the provided hostname, if any port is available, the host is online else the program print the error message "system is unreachable.

You might be interested in
What is the name for the individual sections of the ribbon in PowerPoint 20162
Julli [10]

Answer:

Tabs

Explanation:

The ribbon contains the tabs. The tabs contain the command groups which hold commands

IF THIS HELPS PLEASE MARK THIS ANSWER AS BRAINLIEST

6 0
3 years ago
Which type of app is the best choice when it is critical to be able to use the device's features but performance is not critical
lisov135 [29]

Answer:

Hybrid.

Explanation:

A software can be defined as a set of executable instructions (codes) or collection of data that is used typically to instruct a computer on how to perform a specific task and solve a particular problem.

A software development life cycle (SDLC) can be defined as a strategic process or methodology that defines the key steps or stages for creating and implementing high quality software applications. There are seven (7) main stages in the creation of a software and these are; planning, analysis, design, development (coding), testing, implementation and execution, and maintenance.

Some of the models used in the software development life cycle (SDLC) are;

I. A waterfall model: it can be defined as a process which involves sequentially breaking the software development into linear phases. Thus, the development phase takes a downward flow like a waterfall and as such each phase must be completed before starting another without any overlap in the process.

II. An incremental model: it refers to the process in which the requirements or criteria of the software development is divided into many standalone modules until the program is completed.

III. A spiral model: it can be defined as an evolutionary SDLC that is risk-driven in nature and typically comprises of both an iterative and a waterfall model. Spiral model of SDLC consist of these phases; planning, risk analysis, engineering and evaluation.

Basically, softwares are categorized into three (3) main categories based on the development platform and these are;

a. Web application.

b. Native application.

c. Hybrid application.

A hybrid application is a type of software application that is designed based on the combination of the elements of both web applications and native applications.

Typically, a hybrid application is a web application that is developed in a native application shell, using a standardized web programming language such as CSS, JavaScript, and HTML.

Generally, a hybrid application avails a programmer the opportunity to write a code for a mobile application once while accommodating or being compatible with multiple app platforms such as Android, Windows, iOS, etc.

Hence, a hybrid application is the best choice of an application when it's critical for the end users to be able to use the features associated with a device such as a mobile phone but performance isn't critical.

4 0
3 years ago
A web application consists of one or more web pages. group of answer choices true false
algol [13]

Answer:

true

Explanation:

web application is a software or program which is accessible using any web browser.

5 0
1 year ago
A telecom company wants to extend their horizontal cables over a distance of 510 meters. Which cable should they use?
Volgvan
They should use fiber cable because it is faster and more reliable
8 0
3 years ago
What provision of the Government Paperwork Elimination Act was designed to encourage a paperless society?
Ratling [72]
<span>Validation of electronic signatures was designed to encourage a paperless society.</span>
8 0
3 years ago
Read 2 more answers
Other questions:
  • You just came back to your office from a meeting about is security.​ you've learned a few things about a​ "good" password, and y
    15·1 answer
  • Networks that are designed to connect similar computers that share data and software with each other are called:
    10·1 answer
  • Develop a C++ program that will determine whether a department store customer has exceeded the credit limit on a charge account.
    13·1 answer
  • The scheme function (mult2-diff Ist) should take one argument, a list of numbers, and results in multiplying each number in the
    11·1 answer
  • Default tab stops are set in word every _______ inch. a. ¾ b. ½ c. 1 d. ¼
    7·1 answer
  • Given the following structure and variable definitions, struct customer { char lastName[ 15 ]; char firstName[ 15 ]; unsigned in
    6·1 answer
  • If you wanted to make the system sequentially consistent, what are the key constrains you need to impose
    6·1 answer
  • Temperature converter. This program should prompt the user for two arguments, first a decimal number and second, a single letter
    10·1 answer
  • How can I hide my cracked phone screen? or How can I fix it myself without my parent finding out? or How can I fix my phone with
    14·1 answer
  • DIRECTIONS: Organize your desktop. Name the 5 folders based on the files given below. Organize your own desktop by sorting the g
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!