On the general Host we operate with different applications
web browser, Telnet, FTP, email client (SMTP)
Protocols: HTTP, FTP, TFTP, Telnet, SNMP, DNS
PDU : Data
Answer:
return super.getValue() * 2;
suppose the class Value is partially defined below
public class Value
{
private int number;
public int getValue()
{
return number;
}
}
Explanation:
see Answer
Answer:
## http://pastebin.com/nQWtHb3B
#use above link for formatted program #Python3
c=[float(cord) for cord in input('Enter a point with 2 coordinate :').split(' ')]
base=[0,0]
w=10
h=5
if((abs(c[0]-base[0])<= float(w)/2) and (abs(c[1]-base[1])<= float(h)/2)):
print('Point (',c[0],', ',c[1],') is in the rectange')
else:
print('Point (',c[0],', ',c[1],') is not in the rectange')
Explanation:
A computer keyboard is an input device that allows a person to enter letters, numbers, and other symbols (these are called characters in a keyboard) into a computer. It is one of the most used input devices for computers. Using a keyboard to enter lots of data is called typing
Answer:
def replace_at_index(str, number):
new = str.replace(str[number], "-")
return new
print(replace_at_index("eggplant", 3))
Explanation:
- Create a function called <em>replace_at_index</em> that takes a string and an integer
- Initialize a new variable called <em>new</em>, that will hold the new string
- Replace the character at given index with dash using <em>replace</em> function, it takes two parameters: the first is the character we want to replace, the second is the new character.
- Return the new string
- Call the function with the required inputs