Answer:
The answer is "Option d".
Explanation:
In the given code, two class "TestA and TestB" is defined, that calculates some values which can be described as follows:
- In class "TestA", three integer variable "x, y, and counter" is declared, that initializes with a value, that is "2, 20, and 0", inside the class for loop is declare that uses variable j which starts from and ends when the value of j is less than 100, it will increment the value of counter variable by 1.
- In the class "TestB", an integer "counter" variable is initializes a value with 0, inside the class the for loop is used that uses variable j, which starts from 10, and ends when j is less than 0. in the loop it increments the value of "counter" variable by 1. that's why in this question except "option d" all were wrong.
D. white with a hue
HOPE THIS HELPS
favorite_color = input("Enter favorite color:\n")
pet = input("Enter pet's name:\n")
num = input("Enter a number:\n")
print("You entered: "+favorite_color+" "+pet+" "+num)
password1 = favorite_color+"_"+pet
password2 = num+favorite_color+num
print("First password: "+password1)
print("Second password: "+password2)
print("Number of characters in "+password1+": "+str(len(password1)))
print("Number of characters in "+password2+": "+str(len(password2)))
This works for me.
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.
Answer:
ouch what happened to him
congrats you ruined my childhood
(thanks for the free points!!)