Yes but if the hard drive stops working you will lose your files so it's better to backup your files to a cloud like iCloud by Apple.
Answer:
All
Explanation:
Not sure on the context of this question, but a loop is generally used to iterate though every piece of data to perform some kind of operation, on everything in something like an array or string.
1 or 2 ways I can try to figure out and see what is causing your computer to do this. 1 when was the last time you shut off OR was doing on the computer? If your problem gets fixed make sure you close all running apps so the apps don't update while your computer is shutdown. 2 did you or something unplug the cables? Or maybe a virus caused something. Try to unplug every cable and wait about 5-10 minutes and if your computer is still not working, I would advise contacting an administrator.
Hope this helped.
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.