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
Which answer would it be?
tigry1 [53]
<h2>My Answer:</h2>

FTP: The definition on Wikipedia is; "The File Transfer Protocol (FTP) is a standard network protocol used for the transfer of computer files between a client and server on a computer network."

So, if the question is asking for technology that provides a method for two computers hooked to the internet transfer files back and forth between each other, so if we can sum it up the answer which makes the most sense is <em>FTP</em>.

~TheExpertNerd

3 0
3 years ago
Which installation changes from the old information system to the new one incrementally, starting with one or a few functional c
Wewaii [24]

Answer:

Phased installation

Explanation:

The name of this strategy is phased installation. Phased installation (or phased implementation) occurs when an existing system is replaced by a new one. However, unlike most implementations, this takes place in stages. This has several advantages. First, it allows you to test the system. If there is a problem with it, it is easier to revert back to the old strategy. Moreover, if employees need to adopt this new system, it allows them to get used to it slowly while still being able to access the previous one.

5 0
2 years ago
If you have _____, you can evaluate whether information is misleading, biased, or out of date. Group of answer choices informati
Zepler [3.9K]

Answer:

information literacy

Explanation:

8 0
3 years ago
Write a program in c++ to read two integers, calculate and print the smallest
Shalnov [3]

Answer:

#include<iostream>

using namespace std;

int main (){

int n1, n2;

cout<<"Enter 1st number";

cin>>n1;

cout<<"Enter 2nd number";

cin>>n2;

if(n1<n2){

cout<<"The 1st number is the smallest"<<endl<<" is= "<<n1;

}

else{

cout<<"The 2nd number is the smallest"<<endl<<" is= "<<n2;

}

}

return 0;

3 0
2 years ago
Which of the following creates a new table called 'game_scores' with 2 columns 'player_name' and 'player_score'?
DerKrebs [107]

Answer:

e

Explanation:

the valid sql syntax for creating table is

CREATE TABLE table_name (

column_name column_type

)

varchar and int are the valid sql types not string and integer

AS is used in select queries to aggregate results under given name

8 0
3 years ago
Other questions:
  • Software that helps run the computer's hardware devices and coordinates instructions between applications is called
    10·1 answer
  • Which of the following is a goal of paraphrasing​
    12·1 answer
  • Scale-based classification for networks allows us to differentiate PANs, LANs, MANs, and WANs. Moreover, the structure of a netw
    6·1 answer
  • Which does plug-and-play refer to?
    13·2 answers
  • Head-mounted displays often use organic light emitting diode,or technology.
    15·1 answer
  • Network topology is a direct representation of
    9·1 answer
  • Kylee needs to ensure that if a particular client sends her an email while she is on vacation, the email is forwarded to a cowor
    7·1 answer
  • Activity 1.1.4 What is Technology?
    10·1 answer
  • The _____ constraint assigns a value to an attribute when a new row is added to a table
    5·1 answer
  • in the topology configuration, hosts are connected to each other through a central controller which assumes all responsibility f
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!