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
Select the correct answer.
siniylev [52]

Answer:A

Explanation: J pegs are easily saved and accessed anywhere and show good quality

8 0
3 years ago
Which Internet security risk is associated with dumpster diving?
lora16 [44]

Which Internet security risk is associated with dumpster diving? Identity theft. Identity theft is associated with dumpster diving because it involves taking something from someone else. In this case, instead of looking through a dumpster to get items that were someone elses, they are taking their identity and using it for their own purposes. So identity theft and dumpster diving relate when used in this context.

3 0
4 years ago
Read 2 more answers
12. In Justify the text is aligned both to the right and to the left margins, adding extra space between words as necessary *
Lena [83]

\blue{

\green{

Answer:

  • False

Explanation:

  • Because, aligment the tex are aligned in the centre of the page.

\pink{

\red{

4 0
3 years ago
Read 2 more answers
Unit testing: Select one:
ser-zykov [4K]

Answer:

e. tests each program separately.

Explanation:

Unit testing -

It is one of the software testing where the individual units are tested , is referred to as unit testing.

The focus of this step is to scan each and every unit separately and thoroughly so as to avoid any type of damage or malfunctioning .

Hence, from the question, the correct statement for unit testing is e. tests each program separately.

5 0
3 years ago
An assembly line is an example of which of the following facility layouts?
ikadub [295]

Answer:

Product layout

Explanation:

In configuration of facilities, the four layouts used are the process, product, cellular and fixed-position layouts.In process layout, operations that have similar functions are placed together. Example is a machine shop in manufacturing scenario.Product layouts are applied where there is repetitive assembly and processes.For example in flow shops where large volume of products are produced in a short time. Products that are very large or too heavy use fixed position layouts.Example is ship building or dam construction which require on-spot job performing.Cellular layouts is an equipment layout that will ease the process of cellular manufacturing.For example in group technology, parts of similar designed are identified to be grouped with processes that have similar characteristics to avoid re-arranging of layouts.

6 0
3 years ago
Other questions:
  • ♡ Another Dum Question But Oh Wells -.- ♡
    12·2 answers
  • A must decode this code. I guess is not a Cesar. The last line is a email adress.
    15·1 answer
  • how to create a program that prime number include arraylist , and if not print the prime factors of the number.
    13·1 answer
  • A computer's fqdn is pc42042.east.contoso.corp. which option in the advanced tcp/ip settings dialog box must be enabled to allow
    14·1 answer
  • i want to write a program that display that pattern *********** *********** *********** *********** *********** *********** ****
    6·1 answer
  • As Assembly language code runs on a CPU invoking functions and using the stack, it is clear that CPU registers are
    8·1 answer
  • What is an Action Button?
    10·1 answer
  • Finish the program by choosing the correct terms.
    7·2 answers
  • Order the steps for accessing the junk email options in Outlook 2016
    9·2 answers
  • Write a program which will -
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!