Answer:
-2
Explanation:
mins_by_phone(phone): calculate and return the number of call minutes associated with the given phone line in this plan based on
Answer:
def mins_by_phone(phone):
if phone in self.phones:
min_sum = 0
for call in calls:
min_sum += call
return min_sum
else:
return 0
Explanation:
The mins_by_phone function above is the Phone class method. It checks for the presence of the argument value in the self.phones instance variable, which is a list and sums up and returns the call minutes in the call list.
During periods when the internet is not slowed by congestion, the number of internet searches is probably close to the socially efficient number. how can we tell this this is true?
Answer:
We can this is true because the number of internet searches that are being done at that time is just enough to meet the actual capacity of the internet facility.
Explanation: Socially efficient number is that number that is just enough to meet the actual capacity of a given system such as an internet connectivity or internet facility.
When the number of internet searches are just enough not to cause congestion in the search engines or internet facility,it can be said that the socially efficient number has been achieved.
How is a UDP socket fully identified? What about a TCP socket? What is the difference between the full identification of both sockets?
Answer:
Following are the solution to this question:
Explanation:
Two tuples were fully identified only with UDP socket.:
< IP address assigned, the port for destination >
Its two tuples have been used in UDP as demux, buttons to identify its UDP socket.
The IP address for the destination:
Its received data is directly provided by the IP address of its port.
Port number of the destination:
The function of the IP address of its port number whenever you obtain a UDP segment would be to control the IP addresses of a segment or send that segment to a port with the same IP address. Its port number for endpoint allows demultiplexing incoming information from its IP.
TCP socket is completely recognized by the following four tuples:
< source IP, port source, IP source, port location >
It tuples are being used to label the sockets by using a demultiplexing (demux) key.
IP address source:
The IP address is being used to identify the unique host that links to. It can assume that perhaps the source IP address shows us all the source Addresses of the sender.
Port number of source:
Its port number amount allows us to identify which section is arriving at which port.
IP address destination:
Its IP address of a destination is the IP address of a port accepting incoming information.
Port number of the destination:
It is port numbers number allows us to identify the facilities or section should be sent to.
Differentiation between TCP and UDP identifier:
As TCP ports (4 tuples) and UDP ports (2 tuples) are using demux keys to define socks, however, demux keys in UDP are unique from others in TCP for both the following reasons:
TCP uses a separate socket for every contact between both the server and client whereas UDP utilizes its same sockets to process all clients accessed by UDP servers with all communications, it maintains TCP is much more dependable and hence has to hold a different port.
Even so, UDP doesn't accomplish things apart from multicasting and demodulation, but no separate port is necessary by each link. Therefore the TCP socket becomes connection-driven as well as the UDP socket is direct link-free.
There are different ways' to identify the Socket. The presence or absence of a connection needs that the identifier format of each socket are known to be very different.
The TCP socket is identified by the quadruple. This includes;
Source IP addressSource port numberDestination IP addressDestination port numberAn UDP socket is identified by the tuple such as
Destination IP addressDestination port number
There are some difference between TCP socket and UDP socket. They are;
TCP is known to be a connection-oriented protocol but the UDP is a connectionless protocol. Another difference between TCP and UDP is speed. TCP is said to be slower than UDP. UDP is said to be faster, simpler, and efficient protocol than TCP.
Learn more about TCP socket from
ainly.com/question/17387945
Write a function that takes in two parallel lists: a list of times (in increasing order), and a list of distance traveled by that point in time. The function should return a new list giving the average velocity between consecutive time measurements. The new list should have length one less than the original lists.
Below is the function that takes two parallel lists;
List of times in increasing order and that of distance travelled by that point in time.
I put into consideration the instructions given in the question.
ANSWER;
def find_velocity(time, distance):
velocities = []
for i in range(1, len(time)):
velocities.append((distance[i] - distance[i - 1]) / (time[i] - time[i - 1]))
return velocities
times are = [1, 3, 5, 7]
distances are = [25, 29, 35, 70]
print(find_velocity(times, distances))
What kind of skill is persuasion?
neutral skill
hard skill
soft skill
high skill
Answer:
soft skill
Explanation:
Write a program (main method) that advises the user on programming language. So if a user for instance enters "Java" the program might say "awesome" or if the user enters "Ruby" it might say "are you sure?" . Make the program comment on at least 5 programming languages.
import java.util.Scanner;
public class JavaApplication41 {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String language = scan.nextLine();
if (language.toLowerCase().equals("java")){
System.out.println("Awesome!");
}
else if (language.toLowerCase().equals("python")){
System.out.println("A very simple language!");
}
else if (language.toLowerCase().equals("ruby")){
System.out.println("Are you sure?");
}
else if (language.toLowerCase().equals("javascript")){
System.out.println("Easy enough");
}
else if (language.toLowerCase().equals("c")){
System.out.println("Cool!");
}
}
}
I hope this helps!